From 542f571deecbcc1a1a86cfd960687e5bf1dd546e Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Fri, 26 Jan 2024 01:03:22 +0300 Subject: [PATCH] Remove LINQ cast in HUDOverlay --- osu.Game/Screens/Play/HUDOverlay.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/Play/HUDOverlay.cs b/osu.Game/Screens/Play/HUDOverlay.cs index b5482f2a5b..4fc37b8bb5 100644 --- a/osu.Game/Screens/Play/HUDOverlay.cs +++ b/osu.Game/Screens/Play/HUDOverlay.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; -using System.Linq; using JetBrains.Annotations; using osu.Framework.Allocation; using osu.Framework.Bindables; @@ -259,14 +258,14 @@ namespace osu.Game.Screens.Play Vector2? highestBottomScreenSpace = null; - // LINQ cast can be removed when IDrawable interface includes Anchor / RelativeSizeAxes. - foreach (var element in mainComponents.Components.Cast()) - processDrawable(element); + // cast can be removed when IDrawable interface includes Anchor / RelativeSizeAxes. + foreach (var element in mainComponents.Components) + processDrawable(element as Drawable); if (rulesetComponents != null) { - foreach (var element in rulesetComponents.Components.Cast()) - processDrawable(element); + foreach (var element in rulesetComponents.Components) + processDrawable(element as Drawable); } if (lowestTopScreenSpaceRight.HasValue)