From f948f8ee5c49498ea58fe2a2e5817ef7fbb027c7 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Sun, 25 Feb 2024 17:59:20 +0300 Subject: [PATCH] Fix HUDOverlay allocations --- osu.Game/Screens/Play/HUDOverlay.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index 32ebb82f15..f965d3392a 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -258,13 +258,13 @@ namespace osu.Game.Screens.Play Vector2? highestBottomScreenSpace = null; - foreach (var element in mainComponents.Components) - processDrawable(element); + for (int i = 0; i < mainComponents.Components.Count; i++) + processDrawable(mainComponents.Components[i]); if (rulesetComponents != null) { - foreach (var element in rulesetComponents.Components) - processDrawable(element); + for (int i = 0; i < rulesetComponents.Components.Count; i++) + processDrawable(rulesetComponents.Components[i]); } if (lowestTopScreenSpaceRight.HasValue)