1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 07:27:25 +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 hitobject = hitObjects[i];
for (int j = i + 1; j < hitObjects.Count; ++j)
{
var nextHitobject = context.Beatmap.HitObjects[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.