clang-tidy modernize
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#include "hiscore_table.h"
|
||||
|
||||
#include <SDL3/SDL.h> // Para SDL_GetTicks, SDL_SetRenderTarget
|
||||
#include <stdlib.h> // Para rand, size_t
|
||||
|
||||
#include <algorithm> // Para max
|
||||
#include <cstdlib> // Para rand, size_t
|
||||
#include <functional> // Para function
|
||||
#include <vector> // Para vector
|
||||
|
||||
@@ -32,7 +32,7 @@ HiScoreTable::HiScoreTable()
|
||||
backbuffer_(SDL_CreateTexture(renderer_, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, param.game.width, param.game.height)),
|
||||
fade_(std::make_unique<Fade>()),
|
||||
background_(std::make_unique<Background>()),
|
||||
counter_(0),
|
||||
|
||||
ticks_(0),
|
||||
view_area_(SDL_FRect{0, 0, static_cast<float>(param.game.width), static_cast<float>(param.game.height)}),
|
||||
fade_mode_(FadeMode::IN),
|
||||
@@ -168,7 +168,7 @@ void HiScoreTable::updateFade() {
|
||||
}
|
||||
|
||||
// Convierte un entero a un string con separadores de miles
|
||||
std::string HiScoreTable::format(int number) {
|
||||
auto HiScoreTable::format(int number) -> std::string {
|
||||
const std::string SEPARATOR = ".";
|
||||
const std::string SCORE = std::to_string(number);
|
||||
|
||||
@@ -341,7 +341,7 @@ void HiScoreTable::initBackground() {
|
||||
}
|
||||
|
||||
// Obtiene un color del vector de colores de entradas
|
||||
Color HiScoreTable::getEntryColor(int counter) {
|
||||
auto HiScoreTable::getEntryColor(int counter) -> Color {
|
||||
int cycle_length = entry_colors_.size() * 2 - 2;
|
||||
size_t n = counter % cycle_length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user