Add IBeatmapInfo equality support

This commit is contained in:
Dean Herbert
2021-11-12 18:09:45 +09:00
parent 7323f6a50c
commit a67e156883
4 changed files with 40 additions and 1 deletions

View File

@ -103,5 +103,17 @@ namespace osu.Game.Online.API.Requests.Responses
public string Hash => throw new NotImplementedException();
#endregion
#region Implementation of IEquatable<IBeatmapInfo>
public bool Equals(IBeatmapInfo? other)
{
if (OnlineID > 0 && other?.OnlineID > 0)
return other.OnlineID == OnlineID;
return false;
}
#endregion
}
}