mirror of https://github.com/ppy/osu
Use EqualityComparer<T> to avoid boxing and casting when comparing.
This commit is contained in:
parent
1d51e6af2a
commit
1cddc4eb5b
|
@ -57,7 +57,7 @@ public virtual T DisplayedCount
|
|||
}
|
||||
protected set
|
||||
{
|
||||
if (displayedCount.Equals(value))
|
||||
if (EqualityComparer<T>.Default.Equals(displayedCount, value))
|
||||
return;
|
||||
displayedCount = value;
|
||||
DisplayedCountSpriteText.Text = FormatCount(value);
|
||||
|
|
Loading…
Reference in New Issue