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:
parent
9bd66b6e7a
commit
172a9ce33a
@ -126,12 +126,12 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void updateBreakTimeBindable()
|
private void updateBreakTimeBindable()
|
||||||
{
|
{
|
||||||
foreach (var b in breaks)
|
for (int i = 0; i < breaks.Count; i++)
|
||||||
{
|
{
|
||||||
if (!b.HasEffect)
|
if (!breaks[i].HasEffect)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (Clock.CurrentTime >= b.StartTime && Clock.CurrentTime <= b.EndTime)
|
if (Clock.CurrentTime >= breaks[i].StartTime && Clock.CurrentTime <= breaks[i].EndTime)
|
||||||
{
|
{
|
||||||
isBreakTime.Value = true;
|
isBreakTime.Value = true;
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user