diff --git a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs index aa76d8f98a..436f048e10 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseHitObjects.cs @@ -19,14 +19,13 @@ namespace osu.Desktop.VisualTests.Tests { internal class TestCaseHitObjects : TestCase { - private StopwatchClock rateAdjustClock; private FramedClock framedClock; private bool auto; public TestCaseHitObjects() { - rateAdjustClock = new StopwatchClock(true); + var rateAdjustClock = new StopwatchClock(true); framedClock = new FramedClock(rateAdjustClock); playbackSpeed.ValueChanged += delegate { rateAdjustClock.Rate = playbackSpeed.Value; }; } diff --git a/osu.Game.Modes.Osu/Objects/OsuHitObjectConverter.cs b/osu.Game.Modes.Osu/Objects/OsuHitObjectConverter.cs index 989a5caffb..adac253cc3 100644 --- a/osu.Game.Modes.Osu/Objects/OsuHitObjectConverter.cs +++ b/osu.Game.Modes.Osu/Objects/OsuHitObjectConverter.cs @@ -59,7 +59,7 @@ namespace osu.Game.Modes.Osu.Objects break; if (Vector2.Distance(stackBaseObject.Position, objectN.Position) < stackDistance || - (stackBaseObject is Slider && Vector2.Distance(stackBaseObject.EndPosition, objectN.Position) < stackDistance)) + stackBaseObject is Slider && Vector2.Distance(stackBaseObject.EndPosition, objectN.Position) < stackDistance) { stackBaseIndex = n; diff --git a/osu.Game/Online/API/APIAccess.cs b/osu.Game/Online/API/APIAccess.cs index 799b761a8e..6bb61ca83c 100644 --- a/osu.Game/Online/API/APIAccess.cs +++ b/osu.Game/Online/API/APIAccess.cs @@ -41,7 +41,7 @@ namespace osu.Game.Online.API set { authentication.Token = string.IsNullOrEmpty(value) ? null : OAuthToken.Parse(value); } } - protected bool HasLogin => Token != null || (!string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password)); + protected bool HasLogin => Token != null || !string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password); // ReSharper disable once PrivateFieldCanBeConvertedToLocalVariable (should dispose of this or at very least keep a reference). private Thread thread; diff --git a/osu.Game/Overlays/Options/OptionDropDown.cs b/osu.Game/Overlays/Options/OptionDropDown.cs index 0f49abd515..4387e90b5a 100644 --- a/osu.Game/Overlays/Options/OptionDropDown.cs +++ b/osu.Game/Overlays/Options/OptionDropDown.cs @@ -39,7 +39,7 @@ namespace osu.Game.Overlays.Options bindable.ValueChanged += bindable_ValueChanged; bindable_ValueChanged(null, null); - if ((bool)bindable?.Disabled) + if (bindable.Disabled) Alpha = 0.3f; } }