ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.54k stars 2.31k forks source link

Can someone explain this empty for loop i found while clean up code. #916

Closed johnneijzen closed 7 years ago

johnneijzen commented 7 years ago

it located osu.Game > Ruleset > Objects > SliderCurve.cs Line 178

for (; i < calculatedPath.Count && cumulativeLength[i] < d0; ++i) { }

RemieRichards commented 7 years ago

It's not empty, it increments i which is used after the for loop.

johnneijzen commented 7 years ago

okey see just having {} makes look confusing i wonder if your remove {} will this code still work

peppy commented 7 years ago

Please consider joining our discord channel to follow up on questions like this; makes it much easier to help out! https://discord.gg/ppy