diff --git a/osu.Game/Screens/Edit/EditorBeatmap.cs b/osu.Game/Screens/Edit/EditorBeatmap.cs index 3876fb0903..3a9bd85b0f 100644 --- a/osu.Game/Screens/Edit/EditorBeatmap.cs +++ b/osu.Game/Screens/Edit/EditorBeatmap.cs @@ -146,19 +146,17 @@ namespace osu.Game.Screens.Edit /// /// Removes a from this . /// - /// All to remove. + /// The to remove. /// True if the has been removed, false otherwise. - public void Remove(params HitObject[] hitObjects) + public bool Remove(HitObject hitObject) { - foreach (var h in hitObjects) - { - int index = FindIndex(h); + int index = FindIndex(hitObject); - if (index == -1) - continue; + if (index == -1) + return false; - RemoveAt(index); - } + RemoveAt(index); + return true; } /// @@ -195,9 +193,7 @@ namespace osu.Game.Screens.Edit /// public void Clear() { - var removable = HitObjects.ToList(); - - foreach (var h in removable) + foreach (var h in HitObjects.ToArray()) Remove(h); }