clang-tidy

This commit is contained in:
2025-08-17 10:20:41 +02:00
parent b359a73d50
commit 8ddc5d94f1
73 changed files with 867 additions and 833 deletions

View File

@@ -134,8 +134,8 @@ void BalloonManager::deployFormation(int formation_id, int y) {
// Vacia del vector de globos los globos que ya no sirven
void BalloonManager::freeBalloons() {
auto it = std::remove_if(balloons_.begin(), balloons_.end(), [](const auto &balloon) { return !balloon->isEnabled(); });
balloons_.erase(it, balloons_.end());
auto result = std::ranges::remove_if(balloons_, [](const auto &balloon) { return !balloon->isEnabled(); });
balloons_.erase(result.begin(), balloons_.end());
}
// Actualiza la variable enemyDeployCounter
@@ -336,7 +336,7 @@ void BalloonManager::createTwoBigBalloons() {
// Crea una disposición de globos aleatoria
void BalloonManager::createRandomBalloons() {
const int NUM_BALLOONS = 2 + rand() % 4;
const int NUM_BALLOONS = 2 + (rand() % 4);
for (int i = 0; i < NUM_BALLOONS; ++i) {
const float X = param.game.game_area.rect.x + (rand() % static_cast<int>(param.game.game_area.rect.w)) - Balloon::WIDTH.at(3);
const int Y = param.game.game_area.rect.y + (rand() % 50);