mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Replace null check with assert
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
// 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;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -131,13 +132,13 @@ namespace osu.Game.Graphics.Containers
|
|||||||
public override void Add(T drawable)
|
public override void Add(T drawable)
|
||||||
{
|
{
|
||||||
base.Add(drawable);
|
base.Add(drawable);
|
||||||
|
|
||||||
|
Debug.Assert(drawable != null);
|
||||||
|
|
||||||
lastKnownScroll = float.NaN;
|
lastKnownScroll = float.NaN;
|
||||||
headerHeight = float.NaN;
|
headerHeight = float.NaN;
|
||||||
footerHeight = float.NaN;
|
footerHeight = float.NaN;
|
||||||
|
|
||||||
if (drawable == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (smallestSection == null || smallestSection.Height > drawable.Height)
|
if (smallestSection == null || smallestSection.Height > drawable.Height)
|
||||||
smallestSection = drawable;
|
smallestSection = drawable;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user