From 674ee91bb5dd28d9f4f79a3f0c6d220274a8c3dd Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 15 Feb 2024 11:40:50 +0800 Subject: [PATCH] Define aggregate max delegates as static to further reduce allocations --- osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs b/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs index d2b71b1d5e..cee68cf9a5 100644 --- a/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs +++ b/osu.Game/Screens/Select/Carousel/CarouselBeatmapSet.cs @@ -91,19 +91,19 @@ namespace osu.Game.Screens.Select.Carousel break; case SortMode.LastPlayed: - comparison = -compareUsingAggregateMax(otherSet, b => (b.LastPlayed ?? DateTimeOffset.MinValue).ToUnixTimeSeconds()); + comparison = -compareUsingAggregateMax(otherSet, static b => (b.LastPlayed ?? DateTimeOffset.MinValue).ToUnixTimeSeconds()); break; case SortMode.BPM: - comparison = compareUsingAggregateMax(otherSet, b => b.BPM); + comparison = compareUsingAggregateMax(otherSet, static b => b.BPM); break; case SortMode.Length: - comparison = compareUsingAggregateMax(otherSet, b => b.Length); + comparison = compareUsingAggregateMax(otherSet, static b => b.Length); break; case SortMode.Difficulty: - comparison = compareUsingAggregateMax(otherSet, b => b.StarRating); + comparison = compareUsingAggregateMax(otherSet, static b => b.StarRating); break; case SortMode.DateSubmitted: