clang-tidy
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "global_inputs.h"
|
||||
|
||||
#include <algorithm> // Para std::ranges::any_of
|
||||
#include <functional> // Para function
|
||||
#include <memory> // Para allocator, shared_ptr
|
||||
#include <string> // Para operator+, char_traits, string, to_string
|
||||
@@ -145,11 +146,11 @@ auto checkServiceButton() -> bool {
|
||||
}
|
||||
|
||||
// Mandos
|
||||
for (const auto& gamepad : Input::get()->getGamepads()) {
|
||||
if (Input::get()->checkAction(Input::Action::SERVICE, Input::DO_NOT_ALLOW_REPEAT, Input::DO_NOT_CHECK_KEYBOARD, gamepad)) {
|
||||
toggleServiceMenu();
|
||||
return true;
|
||||
}
|
||||
if (std::ranges::any_of(Input::get()->getGamepads(), [](const auto& gamepad) {
|
||||
return Input::get()->checkAction(Input::Action::SERVICE, Input::DO_NOT_ALLOW_REPEAT, Input::DO_NOT_CHECK_KEYBOARD, gamepad);
|
||||
})) {
|
||||
toggleServiceMenu();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -176,14 +177,13 @@ auto checkSystemInputs() -> bool {
|
||||
#endif
|
||||
};
|
||||
|
||||
for (const auto& [action, func] : ACTIONS) {
|
||||
if (Input::get()->checkAction(action, Input::DO_NOT_ALLOW_REPEAT, Input::CHECK_KEYBOARD)) {
|
||||
func();
|
||||
return std::ranges::any_of(ACTIONS, [](const auto& pair) {
|
||||
if (Input::get()->checkAction(pair.first, Input::DO_NOT_ALLOW_REPEAT, Input::CHECK_KEYBOARD)) {
|
||||
pair.second();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// Comprueba el resto de entradas
|
||||
|
||||
Reference in New Issue
Block a user