Skip to content

Commit 7881f16

Browse files
committed
fix(Device::Matching): Fix device matching between deviceinfo and any that inherit from it
1 parent f1aef5d commit 7881f16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SoundSwitch.Common/Framework/Audio/Device/DeviceInfo.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ public override bool Equals(object obj)
107107
return true;
108108
}
109109

110-
if (obj.GetType() != GetType())
110+
if (obj is not DeviceInfo info)
111111
{
112112
return false;
113113
}
114114

115-
return Equals((DeviceInfo)obj);
115+
return Equals(info);
116116
}
117117

118118
public override int GetHashCode()

0 commit comments

Comments
 (0)