1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

Define aggregate max delegates as static to further reduce allocations

This commit is contained in:
Dean Herbert 2024-02-15 11:40:50 +08:00
parent 80abf6aab3
commit 674ee91bb5
No known key found for this signature in database

View File

@ -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: