mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 22:47:24 +08:00
Replace null check with assert
This commit is contained in:
parent
a6516e3be5
commit
0fcf61d352
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
@ -131,13 +132,13 @@ namespace osu.Game.Graphics.Containers
|
||||
public override void Add(T drawable)
|
||||
{
|
||||
base.Add(drawable);
|
||||
|
||||
Debug.Assert(drawable != null);
|
||||
|
||||
lastKnownScroll = float.NaN;
|
||||
headerHeight = float.NaN;
|
||||
footerHeight = float.NaN;
|
||||
|
||||
if (drawable == null)
|
||||
return;
|
||||
|
||||
if (smallestSection == null || smallestSection.Height > drawable.Height)
|
||||
smallestSection = drawable;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user