From 1cddc4eb5be2686ac35eb85acd8d65507944ea42 Mon Sep 17 00:00:00 2001 From: Huo Yaoyuan Date: Mon, 14 Nov 2016 06:00:27 +0800 Subject: [PATCH] Use EqualityComparer to avoid boxing and casting when comparing. --- osu.Game/Graphics/UserInterface/RollingCounter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/UserInterface/RollingCounter.cs b/osu.Game/Graphics/UserInterface/RollingCounter.cs index 4fefc6b7b6..fd60a8ca8e 100644 --- a/osu.Game/Graphics/UserInterface/RollingCounter.cs +++ b/osu.Game/Graphics/UserInterface/RollingCounter.cs @@ -57,7 +57,7 @@ namespace osu.Game.Graphics.UserInterface } protected set { - if (displayedCount.Equals(value)) + if (EqualityComparer.Default.Equals(displayedCount, value)) return; displayedCount = value; DisplayedCountSpriteText.Text = FormatCount(value);