mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +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;
|
break;
|
||||||
|
|
||||||
case SortMode.LastPlayed:
|
case SortMode.LastPlayed:
|
||||||
comparison = -compareUsingAggregateMax(otherSet, b => (b.LastPlayed ?? DateTimeOffset.MinValue).ToUnixTimeSeconds());
|
comparison = -compareUsingAggregateMax(otherSet, static b => (b.LastPlayed ?? DateTimeOffset.MinValue).ToUnixTimeSeconds());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.BPM:
|
case SortMode.BPM:
|
||||||
comparison = compareUsingAggregateMax(otherSet, b => b.BPM);
|
comparison = compareUsingAggregateMax(otherSet, static b => b.BPM);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.Length:
|
case SortMode.Length:
|
||||||
comparison = compareUsingAggregateMax(otherSet, b => b.Length);
|
comparison = compareUsingAggregateMax(otherSet, static b => b.Length);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.Difficulty:
|
case SortMode.Difficulty:
|
||||||
comparison = compareUsingAggregateMax(otherSet, b => b.StarRating);
|
comparison = compareUsingAggregateMax(otherSet, static b => b.StarRating);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SortMode.DateSubmitted:
|
case SortMode.DateSubmitted:
|
||||||
|
Loading…
Reference in New Issue
Block a user