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.
This commit is contained in:
David Capello 2024-12-10 09:31:32 -03:00
parent 0edc4e16ed
commit cfc92e7cdb

View File

@ -153,7 +153,7 @@ bool ButtonBase::onProcessMessage(Message* msg)
}
break;
case kCheckWidget:
case kCheckWidget: {
KeyMessage* keymsg = static_cast<KeyMessage*>(msg);
KeyScancode scancode = keymsg->scancode();
const bool mnemonicPressed =
@ -171,6 +171,7 @@ bool ButtonBase::onProcessMessage(Message* msg)
break;
}
}
}
break;
case kMouseDownMessage: