mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Use ArgumentNullException.ThrowIfNull in more places
This commit is contained in:
parent
43841e210d
commit
9bac60a98f
@ -135,8 +135,7 @@ namespace osu.Game.Rulesets.UI
|
||||
protected DrawableRuleset(Ruleset ruleset, IBeatmap beatmap, IReadOnlyList<Mod> mods = null)
|
||||
: base(ruleset)
|
||||
{
|
||||
if (beatmap == null)
|
||||
throw new ArgumentNullException(nameof(beatmap), "Beatmap cannot be null.");
|
||||
ArgumentNullException.ThrowIfNull(beatmap);
|
||||
|
||||
if (!(beatmap is Beatmap<TObject> tBeatmap))
|
||||
throw new ArgumentException($"{GetType()} expected the beatmap to contain hitobjects of type {typeof(TObject)}.", nameof(beatmap));
|
||||
|
Loading…
Reference in New Issue
Block a user