1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Remove the nullable disable annotation in the testing beatmap and mark some of the properties as nullable.

This class will be used in some check test cases.
This commit is contained in:
andy840119 2022-10-30 16:51:56 +08:00
parent a1a9238bd1
commit 4c9c65856c

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System.IO;
using osu.Framework.Audio;
using osu.Framework.Audio.Track;
@ -16,7 +14,7 @@ namespace osu.Game.Tests.Beatmaps
public class TestWorkingBeatmap : WorkingBeatmap
{
private readonly IBeatmap beatmap;
private readonly Storyboard storyboard;
private readonly Storyboard? storyboard;
/// <summary>
/// Create an instance which provides the <see cref="IBeatmap"/> when requested.
@ -24,7 +22,7 @@ namespace osu.Game.Tests.Beatmaps
/// <param name="beatmap">The beatmap.</param>
/// <param name="storyboard">An optional storyboard.</param>
/// <param name="audioManager">The <see cref="AudioManager"/>.</param>
public TestWorkingBeatmap(IBeatmap beatmap, Storyboard storyboard = null, AudioManager audioManager = null)
public TestWorkingBeatmap(IBeatmap beatmap, Storyboard? storyboard = null, AudioManager? audioManager = null)
: base(beatmap.BeatmapInfo, audioManager)
{
this.beatmap = beatmap;
@ -37,12 +35,12 @@ namespace osu.Game.Tests.Beatmaps
protected override Storyboard GetStoryboard() => storyboard ?? base.GetStoryboard();
protected internal override ISkin GetSkin() => null;
protected internal override ISkin? GetSkin() => null;
public override Stream GetStream(string storagePath) => null;
public override Stream? GetStream(string storagePath) => null;
protected override Texture GetBackground() => null;
protected override Texture? GetBackground() => null;
protected override Track GetBeatmapTrack() => null;
protected override Track? GetBeatmapTrack() => null;
}
}