1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 10:47:25 +08:00

Enforce non-null for BeatmapManager WorkingBeatmap resources

This commit is contained in:
Dean Herbert 2020-12-22 12:06:10 +09:00
parent a97a2b2a66
commit 85518b4d99

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System; using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq; using System.Linq;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
@ -19,10 +20,11 @@ namespace osu.Game.Beatmaps
[ExcludeFromDynamicCompile] [ExcludeFromDynamicCompile]
private class BeatmapManagerWorkingBeatmap : WorkingBeatmap private class BeatmapManagerWorkingBeatmap : WorkingBeatmap
{ {
[NotNull]
private readonly IBeatmapResourceProvider resources; private readonly IBeatmapResourceProvider resources;
public BeatmapManagerWorkingBeatmap(BeatmapInfo beatmapInfo, IBeatmapResourceProvider resources) public BeatmapManagerWorkingBeatmap(BeatmapInfo beatmapInfo, [NotNull] IBeatmapResourceProvider resources)
: base(beatmapInfo, resources?.AudioManager) : base(beatmapInfo, resources.AudioManager)
{ {
this.resources = resources; this.resources = resources;
} }