Skip to content

Commit

Permalink
fix(Device::Matching): Improve the hashcode to clash with other
Browse files Browse the repository at this point in the history
  • Loading branch information
Belphemur committed Jul 26, 2021
1 parent 2be4c86 commit 718b951
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions SoundSwitch.Common/Framework/Audio/Device/DeviceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ public override int GetHashCode()
unchecked
{
var hashCode = (NameClean != null ? NameClean.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (Id != null ? Id.GetHashCode() : 0);
hashCode = (hashCode * 397) ^ (int) Type;
hashCode = (hashCode * 397) ^ IsUsb.GetHashCode();
return hashCode;
}
}
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "6.0",
"version": "5.0",
"rollForward": "latestMajor",
"allowPrerelease": true
}
}
}

0 comments on commit 718b951

Please sign in to comment.