mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 06:02:56 +08:00
Use exceptions
This commit is contained in:
parent
0709a0926b
commit
194992936d
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Input;
|
using osu.Framework.Input;
|
||||||
@ -44,8 +44,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
|
|||||||
|
|
||||||
public override void Add(HitObjectMask drawable)
|
public override void Add(HitObjectMask drawable)
|
||||||
{
|
{
|
||||||
// Rider 2018.1 requires this (roslyn analyser issue?)
|
if (drawable == null) throw new ArgumentNullException(nameof(drawable));
|
||||||
Debug.Assert(drawable != null);
|
|
||||||
|
|
||||||
base.Add(drawable);
|
base.Add(drawable);
|
||||||
|
|
||||||
@ -55,10 +54,9 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
|
|||||||
drawable.DragRequested += onDragRequested;
|
drawable.DragRequested += onDragRequested;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Remove(HitObjectMask drawable)
|
public override bool Remove([NotNull] HitObjectMask drawable)
|
||||||
{
|
{
|
||||||
// Rider 2018.1 requires this (roslyn analyser issue?)
|
if (drawable == null) throw new ArgumentNullException(nameof(drawable));
|
||||||
Debug.Assert(drawable != null);
|
|
||||||
|
|
||||||
var result = base.Remove(drawable);
|
var result = base.Remove(drawable);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user