mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Use EqualityComparer<T> to avoid boxing and casting when comparing.
This commit is contained in:
parent
1d51e6af2a
commit
1cddc4eb5b
@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
}
|
}
|
||||||
protected set
|
protected set
|
||||||
{
|
{
|
||||||
if (displayedCount.Equals(value))
|
if (EqualityComparer<T>.Default.Equals(displayedCount, value))
|
||||||
return;
|
return;
|
||||||
displayedCount = value;
|
displayedCount = value;
|
||||||
DisplayedCountSpriteText.Text = FormatCount(value);
|
DisplayedCountSpriteText.Text = FormatCount(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user