1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Use a for loop instead of foreach

avoid allocating an iterator
This commit is contained in:
iiSaLMaN 2019-07-25 11:40:45 +03:00
parent 9bd66b6e7a
commit 172a9ce33a

View File

@ -126,12 +126,12 @@ namespace osu.Game.Screens.Play
private void updateBreakTimeBindable()
{
foreach (var b in breaks)
for (int i = 0; i < breaks.Count; i++)
{
if (!b.HasEffect)
if (!breaks[i].HasEffect)
continue;
if (Clock.CurrentTime >= b.StartTime && Clock.CurrentTime <= b.EndTime)
if (Clock.CurrentTime >= breaks[i].StartTime && Clock.CurrentTime <= breaks[i].EndTime)
{
isBreakTime.Value = true;
return;