Skip to content

Commit

Permalink
fix(Device::Matching): Fix device matching between deviceinfo and any…
Browse files Browse the repository at this point in the history
… that inherit from it
  • Loading branch information
Belphemur committed Jan 7, 2023
1 parent f1aef5d commit 7881f16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SoundSwitch.Common/Framework/Audio/Device/DeviceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public override bool Equals(object obj)
return true;
}

if (obj.GetType() != GetType())
if (obj is not DeviceInfo info)
{
return false;
}

return Equals((DeviceInfo)obj);
return Equals(info);
}

public override int GetHashCode()
Expand Down

0 comments on commit 7881f16

Please sign in to comment.