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

File name should be nullable.

This commit is contained in:
andy840119 2022-10-30 16:29:54 +08:00
parent db48a57fa7
commit 505ec800da
3 changed files with 4 additions and 4 deletions

View File

@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Edit.Checks
{
protected override CheckCategory Category => CheckCategory.Audio;
protected override string TypeOfFile => "audio";
protected override string GetFilename(IBeatmap beatmap) => beatmap.Metadata?.AudioFile;
protected override string? GetFilename(IBeatmap beatmap) => beatmap.Metadata?.AudioFile;
}
}

View File

@ -10,6 +10,6 @@ namespace osu.Game.Rulesets.Edit.Checks
{
protected override CheckCategory Category => CheckCategory.Resources;
protected override string TypeOfFile => "background";
protected override string GetFilename(IBeatmap beatmap) => beatmap.Metadata?.BackgroundFile;
protected override string? GetFilename(IBeatmap beatmap) => beatmap.Metadata?.BackgroundFile;
}
}

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Edit.Checks
{
protected abstract CheckCategory Category { get; }
protected abstract string TypeOfFile { get; }
protected abstract string GetFilename(IBeatmap beatmap);
protected abstract string? GetFilename(IBeatmap beatmap);
public CheckMetadata Metadata => new CheckMetadata(Category, $"Missing {TypeOfFile}");
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Edit.Checks
public IEnumerable<Issue> Run(BeatmapVerifierContext context)
{
string filename = GetFilename(context.Beatmap);
string? filename = GetFilename(context.Beatmap);
if (string.IsNullOrEmpty(filename))
{