Fix further warnings

This commit is contained in:
Dean Herbert 2022-01-12 23:42:12 +09:00
parent b5f670cc5b
commit b2d09b7b10
5 changed files with 6 additions and 4 deletions

View File

@ -117,7 +117,7 @@ namespace osu.Game.Tests.Beatmaps.Formats
Assert.AreEqual(string.Empty, metadata.Source); Assert.AreEqual(string.Empty, metadata.Source);
Assert.AreEqual("MBC7 Unisphere 地球ヤバイEP Chikyu Yabai", metadata.Tags); Assert.AreEqual("MBC7 Unisphere 地球ヤバイEP Chikyu Yabai", metadata.Tags);
Assert.AreEqual(557821, beatmapInfo.OnlineID); Assert.AreEqual(557821, beatmapInfo.OnlineID);
Assert.AreEqual(241526, beatmapInfo.BeatmapSet.OnlineID); Assert.AreEqual(241526, beatmapInfo.BeatmapSet?.OnlineID);
} }
} }

View File

@ -145,6 +145,8 @@ namespace osu.Game.Tests.Visual.Playlists
modifiedBeatmap.HitObjects.Clear(); modifiedBeatmap.HitObjects.Clear();
modifiedBeatmap.HitObjects.Add(new HitCircle { StartTime = 5000 }); modifiedBeatmap.HitObjects.Add(new HitCircle { StartTime = 5000 });
Debug.Assert(modifiedBeatmap.BeatmapInfo.BeatmapSet != null);
manager.Import(modifiedBeatmap.BeatmapInfo.BeatmapSet).WaitSafely(); manager.Import(modifiedBeatmap.BeatmapInfo.BeatmapSet).WaitSafely();
}); });

View File

@ -18,7 +18,7 @@ namespace osu.Game.Screens.Select
public BeatmapClearScoresDialog(BeatmapInfo beatmapInfo, Action onCompletion) public BeatmapClearScoresDialog(BeatmapInfo beatmapInfo, Action onCompletion)
{ {
BodyText = $@"{beatmapInfo.Metadata?.Artist} - {beatmapInfo.Metadata?.Title}"; BodyText = beatmapInfo.GetDisplayTitle();
Icon = FontAwesome.Solid.Eraser; Icon = FontAwesome.Solid.Eraser;
HeaderText = @"Clearing all local scores. Are you sure?"; HeaderText = @"Clearing all local scores. Are you sure?";
Buttons = new PopupDialogButton[] Buttons = new PopupDialogButton[]

View File

@ -77,6 +77,6 @@ namespace osu.Game.Skinning
} }
private static SkinInfo createSkinInfo(BeatmapInfo beatmapInfo) => private static SkinInfo createSkinInfo(BeatmapInfo beatmapInfo) =>
new SkinInfo { Name = beatmapInfo.ToString(), Creator = beatmapInfo.Metadata?.Author.Username ?? string.Empty }; new SkinInfo { Name = beatmapInfo.ToString(), Creator = beatmapInfo.Metadata.Author.Username ?? string.Empty };
} }
} }

View File

@ -78,7 +78,7 @@ namespace osu.Game.Storyboards
{ {
get get
{ {
string backgroundPath = BeatmapInfo.BeatmapSet?.Metadata?.BackgroundFile; string backgroundPath = BeatmapInfo.BeatmapSet?.Metadata.BackgroundFile;
if (string.IsNullOrEmpty(backgroundPath)) if (string.IsNullOrEmpty(backgroundPath))
return false; return false;