1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 12:42:54 +08:00

Make selectedHitObjects into a HashSet for quick Contains checks

This commit is contained in:
smoogipoo 2018-02-20 14:48:35 +09:00
parent 87065a0b13
commit 995ecb7d94

View File

@ -3,6 +3,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
@ -27,7 +28,7 @@ namespace osu.Game.Rulesets.Edit.Layers.Selection
private SelectionBox selectionBox; private SelectionBox selectionBox;
private CaptureBox captureBox; private CaptureBox captureBox;
private readonly List<DrawableHitObject> selectedHitObjects = new List<DrawableHitObject>(); private readonly HashSet<DrawableHitObject> selectedHitObjects = new HashSet<DrawableHitObject>();
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
{ {