From 4bafbfb9e49592685dab723c5f4e47b25361ff47 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 26 Aug 2025 18:30:12 +0900 Subject: [PATCH] Apply NRT to `ReplayPlayer` for good measure --- osu.Game/Screens/Play/ReplayPlayer.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/osu.Game/Screens/Play/ReplayPlayer.cs b/osu.Game/Screens/Play/ReplayPlayer.cs index 131ce452bc..83295f82d7 100644 --- a/osu.Game/Screens/Play/ReplayPlayer.cs +++ b/osu.Game/Screens/Play/ReplayPlayer.cs @@ -1,8 +1,6 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - using System; using System.Collections.Generic; using System.Linq; @@ -31,17 +29,17 @@ namespace osu.Game.Screens.Play private readonly Func, Score> createScore; - private PlaybackSettings playbackSettings; + private PlaybackSettings playbackSettings = null!; [Cached(typeof(IGameplayLeaderboardProvider))] private readonly SoloGameplayLeaderboardProvider leaderboardProvider = new SoloGameplayLeaderboardProvider(); - protected override UserActivity InitialActivity => new UserActivity.WatchingReplay(Score.ScoreInfo); + protected override UserActivity? InitialActivity => new UserActivity.WatchingReplay(Score.ScoreInfo); private bool isAutoplayPlayback => GameplayState.Mods.OfType().Any(); private double? lastFrameTime; - private ReplayFailIndicator failIndicator; + private ReplayFailIndicator failIndicator = null!; protected override bool CheckModsAllowFailure() { @@ -60,12 +58,12 @@ namespace osu.Game.Screens.Play return false; } - public ReplayPlayer(Score score, PlayerConfiguration configuration = null) + public ReplayPlayer(Score score, PlayerConfiguration? configuration = null) : this((_, _) => score, configuration) { } - public ReplayPlayer(Func, Score> createScore, PlayerConfiguration configuration = null) + public ReplayPlayer(Func, Score> createScore, PlayerConfiguration? configuration = null) : base(configuration) { this.createScore = createScore;