Use `HashCode.Combine` instead of `string.GetHashCode` + XOR

may write an Analyzer for this later
This commit is contained in:
YoshiRulz 2024-07-04 06:31:44 +10:00
parent 8546618c9a
commit 9f0009b972
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ namespace BizHawk.Client.Common
public override readonly bool Equals(object? obj) => obj is not null && (LogicalButton) obj == this; //TODO safe type check?
public override readonly int GetHashCode() => Button.GetHashCode() ^ Modifiers.GetHashCode();
public override readonly int GetHashCode()
=> HashCode.Combine(Button, Modifiers);
public override readonly string ToString()
{