1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:47:29 +08:00

Add local variable for regular access to HitObjects

This commit is contained in:
Dean Herbert 2021-05-14 16:23:45 +09:00
parent 9069db0743
commit fcb226bd20

View File

@ -23,13 +23,15 @@ namespace osu.Game.Rulesets.Edit.Checks
public IEnumerable<Issue> Run(BeatmapVerifierContext context)
{
for (int i = 0; i < context.Beatmap.HitObjects.Count - 1; ++i)
{
var hitobject = context.Beatmap.HitObjects[i];
var hitObjects = context.Beatmap.HitObjects;
for (int j = i + 1; j < context.Beatmap.HitObjects.Count; ++j)
for (int i = 0; i < hitObjects.Count - 1; ++i)
{
var nextHitobject = context.Beatmap.HitObjects[j];
var hitobject = hitObjects[i];
for (int j = i + 1; j < hitObjects.Count; ++j)
{
var nextHitobject = hitObjects[j];
// Accounts for rulesets with hitobjects separated by columns, such as Mania.
// In these cases we only care about concurrent objects within the same column.