Replace AsNonNull() with Assert()

This commit is contained in:
goodtrailer
2022-07-01 21:22:48 -07:00
parent 471b64bd20
commit f2141715b8

View File

@ -1,8 +1,8 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // See the LICENCE file in the repository root for full licence text.
using System.Diagnostics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
@ -92,10 +92,12 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
if (obj is not DrawableSlider) if (obj is not DrawableSlider)
return; return;
using (BeginAbsoluteSequence(drawableObject.AsNonNull().StateUpdateTime)) Debug.Assert(drawableObject != null);
using (BeginAbsoluteSequence(drawableObject.StateUpdateTime))
this.FadeIn(); this.FadeIn();
using (BeginAbsoluteSequence(drawableObject.AsNonNull().HitStateUpdateTime)) using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime))
this.FadeOut(); this.FadeOut();
} }