clang-tidy modernize

This commit is contained in:
2025-07-20 14:10:54 +02:00
parent 1f0184fde2
commit f5245273a1
22 changed files with 514 additions and 481 deletions

View File

@@ -1,8 +1,9 @@
#include "balloon_manager.h"
#include <algorithm> // Para remove_if
#include <cstdlib> // Para rand
#include <numeric> // Para accumulate
#include <array>
#include <cstdlib> // Para rand
#include <numeric> // Para accumulate
#include "balloon.h" // Para Balloon, BALLOON_SCORE, BALLOON_VELX...
#include "balloon_formations.h" // Para BalloonFormationParams, BalloonForma...
@@ -209,8 +210,8 @@ void BalloonManager::createPowerBall() {
const float RIGHT = param.game.play_area.rect.w - BALLOON_SIZE[4];
const int LUCK = rand() % VALUES;
const float POS_X[VALUES] = {LEFT, LEFT, CENTER, CENTER, RIGHT, RIGHT};
const float VEL_X[VALUES] = {BALLOON_VELX_POSITIVE, BALLOON_VELX_POSITIVE, BALLOON_VELX_POSITIVE, BALLOON_VELX_NEGATIVE, BALLOON_VELX_NEGATIVE, BALLOON_VELX_NEGATIVE};
const std::array<float, VALUES> POS_X = {LEFT, LEFT, CENTER, CENTER, RIGHT, RIGHT};
const std::array<float, VALUES> VEL_X = {BALLOON_VELX_POSITIVE, BALLOON_VELX_POSITIVE, BALLOON_VELX_POSITIVE, BALLOON_VELX_NEGATIVE, BALLOON_VELX_NEGATIVE, BALLOON_VELX_NEGATIVE};
balloons_.emplace_back(std::make_unique<Balloon>(POS_X[LUCK], POS_Y, BalloonType::POWERBALL, BalloonSize::SIZE4, VEL_X[LUCK], balloon_speed_, CREATION_TIME, play_area_, balloon_textures_[4], balloon_animations_[4]));
balloons_.back()->setInvulnerable(true);