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:
parent
7c0e823b95
commit
ffa8a50c6b
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user