mirror of
https://github.com/ppy/osu
synced 2025-01-24 06:43:04 +00:00
Remove null check suppression and add non-null fallback
This commit is contained in:
parent
d3b9660148
commit
a5aa32811a
@ -32,6 +32,7 @@ namespace osu.Game.Beatmaps
|
||||
private static string getVersionString(IBeatmapInfo beatmapInfo) => string.IsNullOrEmpty(beatmapInfo.DifficultyName) ? string.Empty : $"[{beatmapInfo.DifficultyName}]";
|
||||
|
||||
// temporary helper methods until we figure which metadata should be where.
|
||||
private static IBeatmapMetadataInfo getClosestMetadata(IBeatmapInfo beatmapInfo) => (beatmapInfo.Metadata ?? beatmapInfo.BeatmapSet.Metadata)!;
|
||||
private static IBeatmapMetadataInfo getClosestMetadata(IBeatmapInfo beatmapInfo) =>
|
||||
beatmapInfo.Metadata ?? beatmapInfo.BeatmapSet?.Metadata ?? new BeatmapMetadata();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user