neteja clang-tidy

This commit is contained in:
2026-05-16 22:47:41 +02:00
parent 17341f923d
commit a903343385
40 changed files with 1246 additions and 1384 deletions
+6 -5
View File
@@ -157,15 +157,15 @@ auto Input::getNumGamepads() const -> int { return gamepads_.size(); }
// Obtiene el gamepad a partir de un event.id
auto Input::getGamepad(SDL_JoystickID id) const -> std::shared_ptr<Input::Gamepad> {
const auto it = std::ranges::find_if(gamepads_,
const auto IT = std::ranges::find_if(gamepads_,
[id](const auto& gamepad) { return gamepad->instance_id == id; });
return it != gamepads_.end() ? *it : nullptr;
return IT != gamepads_.end() ? *IT : nullptr;
}
auto Input::getGamepadByName(const std::string& name) const -> std::shared_ptr<Input::Gamepad> {
const auto it = std::ranges::find_if(gamepads_,
const auto IT = std::ranges::find_if(gamepads_,
[&name](const auto& gamepad) { return gamepad && gamepad->name == name; });
return it != gamepads_.end() ? *it : nullptr;
return IT != gamepads_.end() ? *IT : nullptr;
}
// Obtiene el SDL_GamepadButton asignado a un action
@@ -360,8 +360,9 @@ auto Input::handleEvent(const SDL_Event& event) -> std::string {
return addGamepad(event.gdevice.which);
case SDL_EVENT_GAMEPAD_REMOVED:
return removeGamepad(event.gdevice.which);
default:
return {};
}
return {};
}
auto Input::addGamepad(int device_index) -> std::string {