mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 16:12:57 +08:00
Remove useless null checks
This commit is contained in:
parent
6a482827fe
commit
90e30bc9e8
@ -110,9 +110,9 @@ namespace osu.Game.Screens.Ranking.Statistics
|
|||||||
{
|
{
|
||||||
var columnsToDisplay = hitEventsAvailable
|
var columnsToDisplay = hitEventsAvailable
|
||||||
? row.Columns
|
? row.Columns
|
||||||
: row.Columns?.Where(c => !c.RequiresHitEvents).ToArray();
|
: row.Columns.Where(c => !c.RequiresHitEvents).ToArray();
|
||||||
|
|
||||||
if (columnsToDisplay?.Any() ?? false)
|
if (columnsToDisplay.Any())
|
||||||
panelIsEmpty = false;
|
panelIsEmpty = false;
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
@ -132,8 +132,8 @@ namespace osu.Game.Screens.Ranking.Statistics
|
|||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
}).Cast<Drawable>().ToArray()
|
}).Cast<Drawable>().ToArray()
|
||||||
},
|
},
|
||||||
ColumnDimensions = Enumerable.Range(0, columnsToDisplay?.Length ?? 0)
|
ColumnDimensions = Enumerable.Range(0, columnsToDisplay.Length)
|
||||||
.Select(i => columnsToDisplay?[i].Dimension ?? new Dimension()).ToArray(),
|
.Select(i => columnsToDisplay[i].Dimension ?? new Dimension()).ToArray(),
|
||||||
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
|
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user