From 1f425c3be8b8cfdd35cf20f1f485c6a013e72b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Sun, 9 Jul 2017 19:40:36 +0300 Subject: [PATCH] Simplify existing code --- .../Tests/TestCaseBeatSyncedContainer.cs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs b/osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs index 29eadfe26e..05038f2d59 100644 --- a/osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCaseBeatSyncedContainer.cs @@ -44,9 +44,9 @@ namespace osu.Desktop.VisualTests.Tests }); } - [BackgroundDependencyLoader] - private void load() + protected override void LoadComplete() { + base.LoadComplete(); mc.ToggleVisibility(); } @@ -147,7 +147,7 @@ namespace osu.Desktop.VisualTests.Tests private int calculateBeatCount(TimingControlPoint current) { - if (timingPoints.IndexOf(current) + 1 == timingPoints.Count) + if (timingPoints[timingPoints.Count - 1] == current) return (int)Math.Ceiling((Beatmap.Value.Track.Length - current.Time) / current.BeatLength); return (int)Math.Ceiling((getNextTimingPoint(current).Time - current.Time) / current.BeatLength); @@ -177,16 +177,9 @@ namespace osu.Desktop.VisualTests.Tests private readonly OsuSpriteText valueText; - private float? value; public float Value { - set - { - if (value == this.value) return; - this.value = value; - - valueText.Text = value.ToString(CultureInfo.CurrentCulture); - } + set { valueText.Text = value.ToString(); } } public InfoString(string header)