mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 09:32:54 +08:00
Shortcut O(n^2) calculation
This commit is contained in:
parent
1c5ab6a906
commit
351ab6e9bd
@ -41,7 +41,8 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
||||
if (endIndex < 0) throw new ArgumentOutOfRangeException(nameof(endIndex), $"{nameof(endIndex)} cannot be < 0.");
|
||||
|
||||
int extendedEndIndex = endIndex;
|
||||
|
||||
if (endIndex < beatmap.HitObjects.Count - 1)
|
||||
{
|
||||
// Extend the end index to include objects they are stacked on
|
||||
for (int i = endIndex; i >= startIndex; i--)
|
||||
{
|
||||
@ -79,6 +80,7 @@ namespace osu.Game.Rulesets.Osu.Beatmaps
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Reverse pass for stack calculation.
|
||||
int extendedStartIndex = startIndex;
|
||||
|
Loading…
Reference in New Issue
Block a user