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

@@ -8,6 +8,7 @@
#include <cmath> // Para abs
#include <stdexcept> // Para runtime_error
#include <string> // Para basic_string, string
#include <string_view>
#include <vector> // Para vector
#include "audio.h" // Para Audio
@@ -30,7 +31,8 @@
#include "utils.h" // Para Color, Zone, SHADOW_TEXT_COLOR, NO_TEXT...
// Textos
constexpr const char TEXT_COPYRIGHT[] = "@2020,2025 JailDesigner";
constexpr std::string_view TEXT_COPYRIGHT = "@2020,2025 JailDesigner";
// Constructor
Credits::Credits()
@@ -218,7 +220,7 @@ void Credits::fillTextTexture() {
// Texto con el copyright
y += mini_logo_sprite->getHeight() + 3;
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, TEXT_COPYRIGHT, 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR);
text->writeDX(TEXT_CENTER | TEXT_SHADOW, param.game.game_area.center_x, y, std::string(TEXT_COPYRIGHT), 1, NO_TEXT_COLOR, 1, SHADOW_TEXT_COLOR);
// Resetea el renderizador
SDL_SetRenderTarget(Screen::get()->getRenderer(), nullptr);