mirror of
https://github.com/osukey/osukey.git
synced 2025-07-04 01:40:02 +09:00
Use IEnumerable.Where<>() rather than List.FindAll()
Saves a whole list allocation
This commit is contained in:
@ -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 =>
|
||||
|
Reference in New Issue
Block a user