mirror of
https://github.com/ppy/osu
synced 2025-01-03 21:02:22 +00:00
Remove boxing overhead in CarouselItem
comparator
This commit is contained in:
parent
b7e845201f
commit
aab84d50eb
@ -49,7 +49,12 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
public virtual int CompareTo(FilterCriteria criteria, CarouselItem other) => ItemID.CompareTo(other.ItemID);
|
||||
|
||||
public int CompareTo(CarouselItem? other) => CarouselYPosition.CompareTo(other?.CarouselYPosition);
|
||||
public int CompareTo(CarouselItem? other)
|
||||
{
|
||||
if (other == null) return 1;
|
||||
|
||||
return CarouselYPosition.CompareTo(other.CarouselYPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public enum CarouselItemState
|
||||
|
Loading…
Reference in New Issue
Block a user