From aefd14b1abf4cb1babf03551d10d983faf3774eb Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 17 Nov 2025 16:31:40 -0600 Subject: [PATCH] chore(ui): fix style nits in SetupFormats --- src/ui/game/CGVideoOptionsScript.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/ui/game/CGVideoOptionsScript.cpp b/src/ui/game/CGVideoOptionsScript.cpp index 655e4ac..56d7fcf 100644 --- a/src/ui/game/CGVideoOptionsScript.cpp +++ b/src/ui/game/CGVideoOptionsScript.cpp @@ -22,17 +22,11 @@ void SetupFormats() { TSGrowableArray adapterFormats; GxAdapterFormats(GxApi_OpenGl, adapterFormats); - int32_t gxColorBits = 0; auto gxColorBitsVar = CVar::Lookup("gxColorBits"); - if (gxColorBitsVar) { - gxColorBits = gxColorBitsVar->GetInt(); - } + int32_t gxColorBits = gxColorBitsVar ? gxColorBitsVar->GetInt() : 0; - int32_t gxDepthBits = 0; auto gxDepthBitsVar = CVar::Lookup("gxDepthBits"); - if (gxDepthBitsVar) { - gxDepthBits = gxDepthBitsVar->GetInt(); - } + int32_t gxDepthBits = gxDepthBitsVar ? gxDepthBitsVar->GetInt() : 0; // TODO what about gxMultisample CVar? @@ -47,7 +41,7 @@ void SetupFormats() { continue; } - int32_t formatPresent = false; + auto formatPresent = false; for (uint32_t j = 0; j < s_multisampleFormats.Count(); j++) { auto& multisampleFormat = s_multisampleFormats[j];