Use `HashCode.Combine` instead of `string.GetHashCode` + XOR
may write an Analyzer for this later
This commit is contained in:
parent
8546618c9a
commit
9f0009b972
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue