From f4515602036311f0413e5ff499ddc0eea65e42f9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 10 Jan 2022 19:27:13 +0900 Subject: [PATCH] Update null allowances across beatmaps and scores --- osu.Game/Beatmaps/BeatmapInfo.cs | 2 +- osu.Game/Scoring/ScoreInfo.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapInfo.cs b/osu.Game/Beatmaps/BeatmapInfo.cs index 00d40dc513..53aba67275 100644 --- a/osu.Game/Beatmaps/BeatmapInfo.cs +++ b/osu.Game/Beatmaps/BeatmapInfo.cs @@ -44,7 +44,7 @@ namespace osu.Game.Beatmaps } [UsedImplicitly] - public BeatmapInfo() // TODO: this bypasses null safeties. needs to be hidden from user api (only should be used by realm). + public BeatmapInfo() // TODO: consider removing this and migrating all usages to ctor with parameters. { } diff --git a/osu.Game/Scoring/ScoreInfo.cs b/osu.Game/Scoring/ScoreInfo.cs index eb4a0d21d7..61df736a4a 100644 --- a/osu.Game/Scoring/ScoreInfo.cs +++ b/osu.Game/Scoring/ScoreInfo.cs @@ -44,7 +44,7 @@ namespace osu.Game.Scoring public long OnlineID { get; set; } = -1; [MapTo("User")] - public RealmUser RealmUser { get; set; } = null!; + public RealmUser RealmUser { get; set; } = new RealmUser(); public ScoreInfo(BeatmapInfo beatmap, RulesetInfo ruleset, RealmUser realmUser) { @@ -54,7 +54,7 @@ namespace osu.Game.Scoring } [UsedImplicitly] - public ScoreInfo() // TODO: this bypasses null safeties. needs to be hidden from user api (only should be used by realm). + public ScoreInfo() // TODO: consider removing this and migrating all usages to ctor with parameters. { }