From f9db76873b486cc21e6b5eea271fe818ee74e1ca Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 13 Jan 2026 10:27:38 +0100 Subject: [PATCH] [client,sdl] fix compiler warnings --- client/SDL/SDL3/sdl_monitor.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/client/SDL/SDL3/sdl_monitor.cpp b/client/SDL/SDL3/sdl_monitor.cpp index 189dc3795..e8a4b08c3 100644 --- a/client/SDL/SDL3/sdl_monitor.cpp +++ b/client/SDL/SDL3/sdl_monitor.cpp @@ -145,7 +145,7 @@ static Uint32 scale(Uint32 val, float scale) return static_cast(sval); } -static BOOL sdl_apply_monitor_properties(rdpMonitor& monitor, SDL_DisplayID id, BOOL isPrimary) +static BOOL sdl_apply_monitor_properties(rdpMonitor& monitor, SDL_DisplayID id, bool isPrimary) { float dpi = SDL_GetDisplayContentScale(id); @@ -241,11 +241,8 @@ static BOOL sdl_apply_display_properties(SdlContext* sdl) } return TRUE; } - const auto& ids = sdl->monitorIds(); - - for (UINT32 x = 0; x < ids.size(); x++) + for (const auto& id : sdl->monitorIds()) { - auto id = ids[x]; rdpMonitor monitor = {}; const auto primary = SDL_GetPrimaryDisplay(); if (!sdl_apply_monitor_properties(monitor, id, id == primary))