From a3f05ca9ecd8bda3928c4061822e788f3ba50b60 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 9 Jan 2018 12:43:10 +0900 Subject: [PATCH] Avoid unnecessary use of linq --- osu.Game/Screens/Select/BeatmapCarousel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 11f0b6d138..c0767cc07a 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -267,7 +267,7 @@ namespace osu.Game.Screens.Select set = visibleSets.ElementAt(RNG.Next(visibleSets.Count)); var visibleBeatmaps = set.Beatmaps.Where(s => !s.Filtered).ToList(); - select(visibleBeatmaps.Skip(RNG.Next(visibleBeatmaps.Count)).FirstOrDefault()); + select(visibleBeatmaps[RNG.Next(visibleBeatmaps.Count)]); return true; }