mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Replace local Equatable implementations with abstract EquivalentTo
This commit is contained in:
@ -1,13 +1,12 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osuTK;
|
||||
using osu.Game.Beatmaps.Timing;
|
||||
|
||||
namespace osu.Game.Beatmaps.ControlPoints
|
||||
{
|
||||
public class TimingControlPoint : ControlPoint, IEquatable<TimingControlPoint>
|
||||
public class TimingControlPoint : ControlPoint
|
||||
{
|
||||
/// <summary>
|
||||
/// The time signature at this control point.
|
||||
@ -27,8 +26,8 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
|
||||
private double beatLength = DEFAULT_BEAT_LENGTH;
|
||||
|
||||
public bool Equals(TimingControlPoint other)
|
||||
=> base.Equals(other)
|
||||
&& TimeSignature == other?.TimeSignature && beatLength.Equals(other.beatLength);
|
||||
public override bool EquivalentTo(ControlPoint other) =>
|
||||
other is TimingControlPoint otherTyped
|
||||
&& TimeSignature == otherTyped?.TimeSignature && beatLength.Equals(otherTyped.beatLength);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user