1
0
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:
Huo Yaoyuan 2016-11-14 06:00:27 +08:00
parent 1d51e6af2a
commit 1cddc4eb5b

View File

@ -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);