Add IBeatmapSetInfo equality support

This commit is contained in:
Dean Herbert
2021-11-12 18:14:11 +09:00
parent a67e156883
commit 54cd1158a4
4 changed files with 36 additions and 2 deletions

View File

@ -141,5 +141,17 @@ namespace osu.Game.Online.API.Requests.Responses
double IBeatmapSetInfo.MaxBPM => BPM;
#endregion
#region Implementation of IEquatable<IBeatmapSetInfo>
public bool Equals(IBeatmapSetInfo? other)
{
if (OnlineID > 0 && other?.OnlineID > 0)
return other.OnlineID == OnlineID;
return false;
}
#endregion
}
}