1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:43:01 +08:00

Merge pull request #3056 from ekrctb/fix-potential-quadratic-complexity

Fix potential quadratic complexity in taiko autoplay
This commit is contained in:
Dean Herbert 2018-07-18 11:48:22 +09:00 committed by GitHub
commit d0f7bdbcb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -88,7 +88,8 @@ namespace osu.Game.Rulesets.Taiko.Scoring
AddJudgement(new TaikoStrongHitJudgement());
break;
case DrumRoll drumRoll:
for (int i = 0; i < drumRoll.NestedHitObjects.OfType<DrumRollTick>().Count(); i++)
var count = drumRoll.NestedHitObjects.OfType<DrumRollTick>().Count();
for (int i = 0; i < count; i++)
{
AddJudgement(new TaikoDrumRollTickJudgement { Result = HitResult.Great });