mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Implement IEquatable<Country>
This commit is contained in:
parent
c451542915
commit
0ac4675546
@ -111,9 +111,6 @@ namespace osu.Game.Overlays
|
||||
|
||||
Show();
|
||||
|
||||
if (country.Value?.FlagName == requested.FlagName)
|
||||
return;
|
||||
|
||||
country.Value = requested;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,12 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace osu.Game.Users
|
||||
{
|
||||
public class Country
|
||||
public class Country : IEquatable<Country>
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of this country.
|
||||
@ -18,5 +19,7 @@ namespace osu.Game.Users
|
||||
/// </summary>
|
||||
[JsonProperty(@"code")]
|
||||
public string FlagName;
|
||||
|
||||
public bool Equals(Country other) => FlagName == other.FlagName;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user