mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 00:42:55 +08:00
Compare by reference in ControlPoint.Equals()
This commit is contained in:
parent
e0c82d11ab
commit
6a26461683
@ -52,8 +52,12 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
&& Equals(otherControlPoint);
|
||||
|
||||
public virtual bool Equals(ControlPoint? other)
|
||||
=> other != null
|
||||
&& Time == other.Time;
|
||||
{
|
||||
if (ReferenceEquals(other, null)) return false;
|
||||
if (ReferenceEquals(other, this)) return true;
|
||||
|
||||
return Time == other.Time;
|
||||
}
|
||||
|
||||
// ReSharper disable once NonReadonlyMemberInGetHashCode
|
||||
public override int GetHashCode() => Time.GetHashCode();
|
||||
|
Loading…
Reference in New Issue
Block a user