1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:33:22 +08:00

Make User IEquatable

This commit is contained in:
smoogipoo 2020-02-27 19:21:59 +09:00
parent 7c0e823b95
commit ffa8a50c6b

View File

@ -9,7 +9,7 @@ using osu.Framework.Bindables;
namespace osu.Game.Users
{
public class User
public class User : IEquatable<User>
{
[JsonProperty(@"id")]
public long Id = 1;
@ -244,5 +244,13 @@ namespace osu.Game.Users
[Description("Touch Screen")]
Touch,
}
public bool Equals(User other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return Id == other.Id;
}
}
}