refactor: resolve Sonar scope and binding findings (#5926)

This commit is contained in:
Dave Lane authored and GitHub committed 2026-10-14 11:44:43 -04:00
1 parent b50c7ba139
commit 71a5a90935
21 files changed
+336 -170

No files matched your search

+2 -4
View File
@@ -948,8 +948,7 @@ namespace input {
*/
if (button == BUTTON_LEFT && release && !input->mouse_left_button_timeout) {
auto f = [=]() {
auto left_released = mouse_press[BUTTON_LEFT];
if (left_released) {
if (auto left_released = mouse_press[BUTTON_LEFT]; left_released) {
// Already released left button
return;
}
@@ -985,8 +984,7 @@ namespace input {
* @return Remapped keycode when configured, otherwise the original keycode.
*/
short map_keycode(short keycode) {
auto it = config::input.keybindings.find(keycode);
if (it != std::end(config::input.keybindings)) {
if (auto it = config::input.keybindings.find(keycode); it != std::end(config::input.keybindings)) {
return it->second;
}