From af6ae1cce560faa31fd4033c4678054050e99a7c Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Fri, 5 Nov 2021 03:49:11 +0300 Subject: [PATCH] Remove hacky code with explicit pragma disable --- osu.Game.Tests/NonVisual/FirstAvailableHitWindowsTest.cs | 5 ++--- osu.Game.Tests/Visual/Gameplay/TestSceneHitErrorMeter.cs | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/osu.Game.Tests/NonVisual/FirstAvailableHitWindowsTest.cs b/osu.Game.Tests/NonVisual/FirstAvailableHitWindowsTest.cs index 97105b6b6a..8d83fe7452 100644 --- a/osu.Game.Tests/NonVisual/FirstAvailableHitWindowsTest.cs +++ b/osu.Game.Tests/NonVisual/FirstAvailableHitWindowsTest.cs @@ -79,8 +79,10 @@ namespace osu.Game.Tests.NonVisual public List HitObjects; public override IEnumerable Objects => HitObjects; +#pragma warning disable 67 public override event Action NewResult; public override event Action RevertResult; +#pragma warning restore 67 public override Playfield Playfield { get; } public override Container Overlays { get; } @@ -95,9 +97,6 @@ namespace osu.Game.Tests.NonVisual public TestDrawableRuleset() : base(new OsuRuleset()) { - // won't compile without this. - NewResult?.Invoke(null); - RevertResult?.Invoke(null); } public override void SetReplayScore(Score replayScore) => throw new NotImplementedException(); diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneHitErrorMeter.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneHitErrorMeter.cs index 1ba0965ceb..aa29f1386c 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneHitErrorMeter.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneHitErrorMeter.cs @@ -235,8 +235,10 @@ namespace osu.Game.Tests.Visual.Gameplay public override IEnumerable Objects => new[] { new HitCircle { HitWindows = HitWindows } }; +#pragma warning disable 67 public override event Action NewResult; public override event Action RevertResult; +#pragma warning restore 67 public override Playfield Playfield { get; } public override Container Overlays { get; } @@ -251,9 +253,6 @@ namespace osu.Game.Tests.Visual.Gameplay public TestDrawableRuleset() : base(new OsuRuleset()) { - // won't compile without this. - NewResult?.Invoke(null); - RevertResult?.Invoke(null); } public override void SetReplayScore(Score replayScore) => throw new NotImplementedException();