forked from jaildesigner-jailgames/jaildoctors_dilemma
cppcheck
This commit is contained in:
@@ -341,7 +341,7 @@ void Input::resetInputStates() {
|
||||
key.second.just_pressed = false;
|
||||
}
|
||||
// Resetear todos los ControllerBindings.active a false
|
||||
for (auto& gamepad : gamepads_) {
|
||||
for (const auto& gamepad : gamepads_) {
|
||||
for (auto& binding : gamepad->bindings) {
|
||||
binding.second.is_held = false;
|
||||
binding.second.just_pressed = false;
|
||||
|
||||
@@ -89,7 +89,7 @@ class Input {
|
||||
std::string path;
|
||||
std::unordered_map<Action, ButtonState> bindings;
|
||||
|
||||
Gamepad(SDL_Gamepad* gamepad)
|
||||
explicit Gamepad(SDL_Gamepad* gamepad)
|
||||
: pad(gamepad),
|
||||
instance_id(SDL_GetJoystickID(SDL_GetGamepadJoystick(gamepad))),
|
||||
name(std::string(SDL_GetGamepadName(gamepad))),
|
||||
|
||||
@@ -46,8 +46,8 @@ class SurfaceAnimatedSprite : public SurfaceMovingSprite {
|
||||
// [DOC:29/10/2025] la surface ara se pillarà del .ANI.
|
||||
// Necesite constructors que no requereixquen la surface al crear el objecte,
|
||||
// ja que la trau al llegir el arxiu. Aixó afecta a totes les classes base...
|
||||
SurfaceAnimatedSprite(const std::string& file_path);
|
||||
SurfaceAnimatedSprite(const Animations& animations);
|
||||
explicit SurfaceAnimatedSprite(const std::string& file_path);
|
||||
explicit SurfaceAnimatedSprite(const Animations& animations);
|
||||
// [/DOC]
|
||||
SurfaceAnimatedSprite(std::shared_ptr<Surface> surface, const std::string& file_path);
|
||||
SurfaceAnimatedSprite(std::shared_ptr<Surface> surface, const Animations& animations);
|
||||
|
||||
@@ -51,7 +51,7 @@ struct ResourcePalette {
|
||||
Palette palette; // Paleta
|
||||
|
||||
// Constructor
|
||||
ResourcePalette(std::string name, Palette palette)
|
||||
ResourcePalette(std::string name, const Palette& palette)
|
||||
: name(std::move(name)),
|
||||
palette(palette) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user