Apply nullability to osu!mania skinning classes

This commit is contained in:
Dean Herbert
2022-11-09 13:37:04 +09:00
parent 82ff142b1b
commit a6165ea78a
19 changed files with 42 additions and 93 deletions

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;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
@ -19,15 +17,15 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
public class LegacyManiaColumnElement : CompositeDrawable
{
[Resolved]
protected Column Column { get; private set; }
protected Column Column { get; private set; } = null!;
[Resolved]
private StageDefinition stage { get; set; }
private StageDefinition stage { get; set; } = null!;
/// <summary>
/// The column type identifier to use for texture lookups, in the case of no user-provided configuration.
/// </summary>
protected string FallbackColumnIndex { get; private set; }
protected string FallbackColumnIndex { get; private set; } = null!;
[BackgroundDependencyLoader]
private void load()
@ -41,7 +39,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
}
}
protected IBindable<T> GetColumnSkinConfig<T>(ISkin skin, LegacyManiaSkinConfigurationLookups lookup)
protected IBindable<T>? GetColumnSkinConfig<T>(ISkin skin, LegacyManiaSkinConfigurationLookups lookup) where T : notnull
=> skin.GetManiaSkinConfig<T>(lookup, Column.Index);
}
}