mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08: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 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
|
public enum CarouselItemState
|
||||||
|
Loading…
Reference in New Issue
Block a user