mirror of
https://github.com/ppy/osu.git
synced 2025-03-17 17:17:19 +08:00
Further fix nullability
This commit is contained in:
parent
69260ca3c3
commit
6abbc7dc28
@ -739,7 +739,9 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
foreach (var panel in Scroll.Children)
|
||||
{
|
||||
if (toDisplay.Remove(panel.Item!))
|
||||
Debug.Assert(panel.Item != null);
|
||||
|
||||
if (toDisplay.Remove(panel.Item))
|
||||
{
|
||||
// panel already displayed.
|
||||
continue;
|
||||
|
@ -2,7 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using osu.Framework.Bindables;
|
||||
|
||||
namespace osu.Game.Screens.Select.Carousel
|
||||
@ -50,12 +49,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
public virtual int CompareTo(FilterCriteria criteria, CarouselItem other) => ItemID.CompareTo(other.ItemID);
|
||||
|
||||
public int CompareTo(CarouselItem? other)
|
||||
{
|
||||
Debug.Assert(other != null);
|
||||
|
||||
return CarouselYPosition.CompareTo(other.CarouselYPosition);
|
||||
}
|
||||
public int CompareTo(CarouselItem? other) => CarouselYPosition.CompareTo(other?.CarouselYPosition);
|
||||
}
|
||||
|
||||
public enum CarouselItemState
|
||||
|
@ -146,7 +146,7 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
private void updateBeatmapDifficulties()
|
||||
{
|
||||
if (Item == null) return;
|
||||
Debug.Assert(Item != null);
|
||||
|
||||
var carouselBeatmapSet = (CarouselBeatmapSet)Item;
|
||||
|
||||
@ -197,10 +197,12 @@ namespace osu.Game.Screens.Select.Carousel
|
||||
|
||||
foreach (var panel in beatmapContainer.Children)
|
||||
{
|
||||
Debug.Assert(panel.Item != null);
|
||||
|
||||
if (isSelected)
|
||||
{
|
||||
panel.MoveToY(yPos, 800, Easing.OutQuint);
|
||||
yPos += panel.Item!.TotalHeight;
|
||||
yPos += panel.Item.TotalHeight;
|
||||
}
|
||||
else
|
||||
panel.MoveToY(0, 800, Easing.OutQuint);
|
||||
|
Loading…
x
Reference in New Issue
Block a user