mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Implement equality correctly in Live
This commit is contained in:
parent
0fcd9e02f6
commit
9226f0abbc
@ -51,7 +51,13 @@ namespace osu.Game.Database
|
|||||||
ID = id;
|
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);
|
public override int GetHashCode() => HashCode.Combine(ID);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user