From ec6267c5b2a97873cfc3f47d5343bb1ed66b66d7 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 12 Apr 2017 19:41:11 +0900 Subject: [PATCH] switch -> if. --- osu.Game/Graphics/UserInterface/OsuSliderBar.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuSliderBar.cs b/osu.Game/Graphics/UserInterface/OsuSliderBar.cs index 9781a507cc..7895ae0aa4 100644 --- a/osu.Game/Graphics/UserInterface/OsuSliderBar.cs +++ b/osu.Game/Graphics/UserInterface/OsuSliderBar.cs @@ -88,15 +88,10 @@ namespace osu.Game.Graphics.UserInterface lastSampleTime = Clock.CurrentTime; sample.Frequency.Value = 1 + NormalizedValue * 0.2f; - switch (NormalizedValue) - { - case 0: - sample.Frequency.Value -= 0.4f; - break; - case 1: - sample.Frequency.Value += 0.4f; - break; - } + if (NormalizedValue == 0) + sample.Frequency.Value -= 0.4f; + else if (NormalizedValue == 1) + sample.Frequency.Value += 0.4f; sample.Play(); }