1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Fix wrong checks..

This commit is contained in:
Salman Ahmed 2020-12-28 15:30:52 +03:00
parent 5efcdbd431
commit 41b79d938b
3 changed files with 3 additions and 3 deletions

View File

@ -53,7 +53,7 @@ namespace osu.Game.Online.API
}
public bool Equals(IMod other) => other is APIMod them && Equals(them);
public bool Equals(APIMod other) => ((IMod)this).Equals(other);
public bool Equals(APIMod other) => Acronym == other?.Acronym;
public override string ToString()
{

View File

@ -150,6 +150,6 @@ namespace osu.Game.Rulesets.Mods
}
public bool Equals(IMod other) => other is Mod them && Equals(them);
public bool Equals(Mod other) => Acronym == other?.Acronym;
public bool Equals(Mod other) => GetType() == other?.GetType();
}
}

View File

@ -257,7 +257,7 @@ namespace osu.Game.Scoring
public string Acronym { get; set; }
bool IEquatable<IMod>.Equals(IMod other) => other is DeserializedMod them && Equals(them);
public bool Equals(DeserializedMod other) => ((IMod)this).Equals(other);
public bool Equals(DeserializedMod other) => Acronym == other?.Acronym;
}
public override string ToString() => $"{User} playing {Beatmap}";