Silence a few remaining nullability warnings

This commit is contained in:
Bartłomiej Dach 2023-07-04 22:39:26 +02:00
parent bcdbdf57ef
commit e2ddcb2349
No known key found for this signature in database
6 changed files with 6 additions and 6 deletions

View File

@ -48,7 +48,7 @@ namespace osu.Game.Tests.Visual.Ranking
var author = new RealmUser { Username = "mapper_name" };
var score = TestResources.CreateTestScoreInfo(createTestBeatmap(author));
score.Mods = score.BeatmapInfo.Ruleset.CreateInstance().CreateAllMods().ToArray();
score.Mods = score.BeatmapInfo!.Ruleset.CreateInstance().CreateAllMods().ToArray();
showPanel(score);
});

View File

@ -405,7 +405,7 @@ namespace osu.Game.Tests.Visual.Ranking
public UnrankedSoloResultsScreen(ScoreInfo score)
: base(score, true)
{
Score.BeatmapInfo.OnlineID = 0;
Score.BeatmapInfo!.OnlineID = 0;
Score.BeatmapInfo.Status = BeatmapOnlineStatus.Pending;
}

View File

@ -163,7 +163,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
},
username,
#pragma warning disable 618
new StatisticText(score.MaxCombo, score.BeatmapInfo.MaxCombo, @"0\x"),
new StatisticText(score.MaxCombo, score.BeatmapInfo!.MaxCombo, @"0\x"),
#pragma warning restore 618
};

View File

@ -123,7 +123,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
accuracyColumn.Text = value.DisplayAccuracy;
maxComboColumn.Text = value.MaxCombo.ToLocalisableString(@"0\x");
ppColumn.Alpha = value.BeatmapInfo.Status.GrantsPerformancePoints() ? 1 : 0;
ppColumn.Alpha = value.BeatmapInfo!.Status.GrantsPerformancePoints() ? 1 : 0;
if (value.PP is double pp)
ppColumn.Text = pp.ToLocalisableString(@"N0");

View File

@ -68,7 +68,7 @@ namespace osu.Game.Screens.Play
{
IBeatmapInfo beatmap = score.ScoreInfo.BeatmapInfo;
Debug.Assert(beatmap.OnlineID > 0);
Debug.Assert(beatmap!.OnlineID > 0);
return new SubmitSoloScoreRequest(score.ScoreInfo, token, beatmap.OnlineID);
}

View File

@ -66,7 +66,7 @@ namespace osu.Game.Screens.Ranking.Expanded
[BackgroundDependencyLoader]
private void load(BeatmapDifficultyCache beatmapDifficultyCache)
{
var beatmap = score.BeatmapInfo;
var beatmap = score.BeatmapInfo!;
var metadata = beatmap.BeatmapSet?.Metadata ?? beatmap.Metadata;
string creator = metadata.Author.Username;