Remove OnlineID comparison from ScoreInfo.Equals

This matches the implementation we have for `BeatmapInfo` and
`BeatmapSetInfo`. All comparisons of `OnlineID` should be done directly
using them (ie. how it's done in `ScoreModelDownloader`).
This commit is contained in:
Dean Herbert
2021-12-10 18:11:52 +09:00
parent c6d0d6451d
commit 5f6e887be7
2 changed files with 3 additions and 27 deletions

View File

@ -232,19 +232,13 @@ namespace osu.Game.Scoring
public bool Equals(ScoreInfo other)
{
if (other == null)
return false;
if (ReferenceEquals(this, other)) return true;
if (other == null) return false;
if (ID != 0 && other.ID != 0)
return ID == other.ID;
if (OnlineID > 0)
return OnlineID == other.OnlineID;
if (!string.IsNullOrEmpty(Hash) && !string.IsNullOrEmpty(other.Hash))
return Hash == other.Hash;
return ReferenceEquals(this, other);
return false;
}
#region Implementation of IHasOnlineID