neteja cppcheck (105 → 0)

This commit is contained in:
2026-05-16 19:35:23 +02:00
parent c9d16959d0
commit fcd2718794
48 changed files with 293 additions and 486 deletions
+1 -1
View File
@@ -85,7 +85,7 @@ class Balloon {
};
// --- Constructores y destructor ---
Balloon(const Config& config);
explicit Balloon(const Config& config);
~Balloon() = default;
// --- Métodos principales ---
+1 -1
View File
@@ -977,7 +977,7 @@ void Player::playSound(const std::string& name) const {
return;
}
static auto* audio_ = Audio::get();
static const auto* audio_ = Audio::get();
audio_->playSound(name);
}
+7 -7
View File
@@ -114,7 +114,7 @@ class Player {
};
// --- Constructor y destructor ---
Player(const Config& config);
explicit Player(const Config& config);
~Player() = default;
// --- Inicialización y ciclo de vida ---
@@ -201,16 +201,16 @@ class Player {
[[nodiscard]] auto getCoffees() const -> int { return coffees_; }
[[nodiscard]] auto getPowerUpCounter() const -> int { return power_up_counter_; }
[[nodiscard]] auto getInvulnerableCounter() const -> int { return invulnerable_counter_; }
[[nodiscard]] auto getBulletColor() const -> Bullet::Color; // Devuelve el color actual de bala según el estado
auto getNextBulletColor() -> Bullet::Color; // Devuelve el color para la próxima bala (alterna si está en modo toggle)
void setBulletColors(Bullet::Color normal, Bullet::Color powered); // Establece los colores de bala para este jugador
[[nodiscard]] auto getBulletSoundFile() const -> std::string { return bullet_sound_file_; } // Devuelve el archivo de sonido de bala
void setBulletSoundFile(const std::string& filename); // Establece el archivo de sonido de bala para este jugador
[[nodiscard]] auto getBulletColor() const -> Bullet::Color; // Devuelve el color actual de bala según el estado
auto getNextBulletColor() -> Bullet::Color; // Devuelve el color para la próxima bala (alterna si está en modo toggle)
void setBulletColors(Bullet::Color normal, Bullet::Color powered); // Establece los colores de bala para este jugador
[[nodiscard]] auto getBulletSoundFile() const -> const std::string& { return bullet_sound_file_; } // Devuelve el archivo de sonido de bala
void setBulletSoundFile(const std::string& filename); // Establece el archivo de sonido de bala para este jugador
// Contadores y timers
[[nodiscard]] auto getContinueCounter() const -> int { return continue_counter_; }
[[nodiscard]] auto getRecordName() const -> std::string { return enter_name_ ? enter_name_->getFinalName() : "xxx"; }
[[nodiscard]] auto getLastEnterName() const -> std::string { return last_enter_name_; }
[[nodiscard]] auto getLastEnterName() const -> const std::string& { return last_enter_name_; }
// --- Configuración e interfaz externa ---
void setName(const std::string& name) { name_ = name; }