From faa221027444b36fd3089888119c39964bbdbe4a Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sun, 24 Jan 2021 00:55:45 +0300 Subject: [PATCH] Use old-style Enum.GetValues method for older than .NET 5 --- .../UserInterface/TestSceneUpdateableBeatmapSetCover.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs index 2ffa7e2668..2f60fbcda8 100644 --- a/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs +++ b/osu.Game.Tests/Visual/UserInterface/TestSceneUpdateableBeatmapSetCover.cs @@ -57,11 +57,15 @@ namespace osu.Game.Tests.Visual.UserInterface } }; +#if NET5_0 var coverTypes = Enum.GetValues(); +#else + var coverTypes = Enum.GetValues(typeof(BeatmapSetCoverType)).Cast(); +#endif for (int i = 0; i < 25; i++) { - var coverType = coverTypes[i % coverTypes.Length]; + var coverType = coverTypes.ElementAt(i); var cover = new UpdateableBeatmapSetCover(coverType) {