Don't compare spans with null.

This commit is contained in:
Huo Yaoyuan 2019-12-03 20:09:58 +08:00
parent a42f9447e6
commit 05cfef92f9

View File

@ -273,14 +273,6 @@ namespace osu.Game.Rulesets.Objects
return p0 + (p1 - p0) * (float)w; return p0 + (p1 - p0) * (float)w;
} }
public bool Equals(SliderPath other) public bool Equals(SliderPath other) => ControlPoints.SequenceEqual(other.ControlPoints) && ExpectedDistance == other.ExpectedDistance && Type == other.Type;
{
if (ControlPoints == null && other.ControlPoints != null)
return false;
if (other.ControlPoints == null && ControlPoints != null)
return false;
return ControlPoints.SequenceEqual(other.ControlPoints) && ExpectedDistance == other.ExpectedDistance && Type == other.Type;
}
} }
} }