mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Use IEnumerable.Where<>() rather than List.FindAll()
Saves a whole list allocation
This commit is contained in:
parent
4f40a04425
commit
ba1a854701
@ -56,7 +56,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
if (BeatmapSet != null)
|
||||
{
|
||||
Difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.FindAll(b => b.Ruleset.Equals(ruleset.Value)).OrderBy(b => b.StarDifficulty).Select(b => new DifficultySelectorButton(b)
|
||||
Difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.Where(b => b.Ruleset.Equals(ruleset.Value)).OrderBy(b => b.StarDifficulty).Select(b => new DifficultySelectorButton(b)
|
||||
{
|
||||
State = DifficultySelectorState.NotSelected,
|
||||
OnHovered = beatmap =>
|
||||
|
Loading…
Reference in New Issue
Block a user