mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 08:27:49 +08:00
Define aggregate max delegates as static to further reduce allocations
This commit is contained in:
parent
80abf6aab3
commit
674ee91bb5
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user