From cfc92e7cdb7c8e320ce7163b221aaa57fe517c03 Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 10 Dec 2024 09:31:32 -0300 Subject: [PATCH] Add { } in switch-case to define vars inside This is required if a new case is added below in the future to avoid compiler errors. It's better to always use { } if we're going to define local variables for the case. --- src/ui/button.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/button.cpp b/src/ui/button.cpp index 808aab5a6..90c415e1a 100644 --- a/src/ui/button.cpp +++ b/src/ui/button.cpp @@ -153,7 +153,7 @@ bool ButtonBase::onProcessMessage(Message* msg) } break; - case kCheckWidget: + case kCheckWidget: { KeyMessage* keymsg = static_cast(msg); KeyScancode scancode = keymsg->scancode(); const bool mnemonicPressed = @@ -169,6 +169,7 @@ bool ButtonBase::onProcessMessage(Message* msg) return true; } break; + } } } break;