mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Implement equality correctly in Live
This commit is contained in:
@ -51,7 +51,13 @@ namespace osu.Game.Database
|
||||
ID = id;
|
||||
}
|
||||
|
||||
public bool Equals(Live<T>? other) => ID == other?.ID;
|
||||
public bool Equals(Live<T>? other)
|
||||
{
|
||||
if (ReferenceEquals(this, other)) return true;
|
||||
if (other == null) return false;
|
||||
|
||||
return ID == other.ID;
|
||||
}
|
||||
|
||||
public override int GetHashCode() => HashCode.Combine(ID);
|
||||
|
||||
|
Reference in New Issue
Block a user