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