From 80abf6aab346b2f5eed5745c81a521547bf81c26 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 15 Feb 2024 09:45:24 +0800 Subject: [PATCH] Avoid some further enumerator allocations --- osu.Game/Screens/Select/Carousel/CarouselGroup.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/Carousel/CarouselGroup.cs b/osu.Game/Screens/Select/Carousel/CarouselGroup.cs index b2ca117cec..62d694976f 100644 --- a/osu.Game/Screens/Select/Carousel/CarouselGroup.cs +++ b/osu.Game/Screens/Select/Carousel/CarouselGroup.cs @@ -2,6 +2,8 @@ // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; +using osu.Framework.Extensions.ListExtensions; +using osu.Framework.Lists; namespace osu.Game.Screens.Select.Carousel { @@ -12,7 +14,7 @@ namespace osu.Game.Screens.Select.Carousel { public override DrawableCarouselItem? CreateDrawableRepresentation() => null; - public IReadOnlyList Items => items; + public SlimReadOnlyListWrapper Items => items.AsSlimReadOnly(); public int TotalItemsNotFiltered { get; private set; }