jugant amb clang-tidy

This commit is contained in:
2025-07-19 22:38:01 +02:00
parent 1d3fd79a9e
commit a7ef29b750
28 changed files with 735 additions and 734 deletions

View File

@@ -234,9 +234,9 @@ void Resource::loadAnimations() {
void Resource::loadDemoData() {
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\n>> DEMO FILES");
constexpr std::array<const char *, 2> demo_files = {"demo1.bin", "demo2.bin"};
constexpr std::array<const char *, 2> DEMO_FILES = {"demo1.bin", "demo2.bin"};
for (const auto &file : demo_files) {
for (const auto &file : DEMO_FILES) {
updateLoadingProgress(file);
demos_.emplace_back(loadDemoDataFromFile(Asset::get()->get(file)));
}
@@ -286,7 +286,7 @@ void Resource::createTextures() {
}
// Texturas de tamaño doble
std::vector<NameAndText> strings2X = {
std::vector<NameAndText> strings2_x = {
{"game_text_100000_points", "100.000"},
{"game_text_get_ready", Lang::getText("[GAME_TEXT] 7")},
{"game_text_last_stage", Lang::getText("[GAME_TEXT] 3")},
@@ -294,7 +294,7 @@ void Resource::createTextures() {
{"game_text_game_over", "Game Over"}};
auto text2 = getText("04b_25_2x");
for (const auto &s : strings2X) {
for (const auto &s : strings2_x) {
textures_.emplace_back(Resource::ResourceTexture(s.name, text2->writeToTexture(s.text, 1, -4)));
printWithDots("Texture : ", s.name, "[ DONE ]");
}
@@ -304,11 +304,11 @@ void Resource::createTextures() {
void Resource::createText() {
struct ResourceInfo {
std::string key;
std::string textureFile;
std::string textFile;
std::string texture_file;
std::string text_file;
ResourceInfo(const std::string &k, const std::string &tFile, const std::string &txtFile)
: key(k), textureFile(tFile), textFile(txtFile) {}
ResourceInfo(const std::string &k, const std::string &t_file, const std::string &txt_file)
: key(k), texture_file(t_file), text_file(txt_file) {}
};
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "\n>> CREATING TEXT OBJECTS");
@@ -328,7 +328,7 @@ void Resource::createText() {
{"smb2_grad", "smb2_grad.png", "smb2.txt"}};
for (const auto &resource : resources) {
texts_.emplace_back(Resource::ResourceText(resource.key, std::make_shared<Text>(getTexture(resource.textureFile), getTextFile(resource.textFile))));
texts_.emplace_back(Resource::ResourceText(resource.key, std::make_shared<Text>(getTexture(resource.texture_file), getTextFile(resource.text_file))));
printWithDots("Text : ", resource.key, "[ DONE ]");
}
}