mirror of
https://github.com/LizardByte/Sunshine.git
synced 2026-12-03 18:36:30 +00:00
refactor: resolve Sonar scope and binding findings (#5926)
This commit is contained in:
1 parent
b50c7ba139
commit
71a5a90935
21 files changed
+336
-170
No files matched your search
+2
-4
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user