mirror of
https://github.com/ppy/osu
synced 2025-03-20 18:08:25 +00: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)
|
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,
|
State = DifficultySelectorState.NotSelected,
|
||||||
OnHovered = beatmap =>
|
OnHovered = beatmap =>
|
||||||
|
Loading…
Reference in New Issue
Block a user