mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Convert assert to hard throw
This commit is contained in:
@ -988,8 +988,7 @@ namespace osu.Game
|
|||||||
if (cache)
|
if (cache)
|
||||||
dependencies.CacheAs(component);
|
dependencies.CacheAs(component);
|
||||||
|
|
||||||
var drawableComponent = component as Drawable;
|
var drawableComponent = component as Drawable ?? throw new ArgumentException($"Component must be a {nameof(Drawable)}", nameof(component));
|
||||||
Debug.Assert(drawableComponent != null);
|
|
||||||
|
|
||||||
if (component is OsuFocusedOverlayContainer overlay)
|
if (component is OsuFocusedOverlayContainer overlay)
|
||||||
focusedOverlays.Add(overlay);
|
focusedOverlays.Add(overlay);
|
||||||
|
Reference in New Issue
Block a user