neteja cppcheck (105 → 0)

This commit is contained in:
2026-05-16 19:35:23 +02:00
parent c9d16959d0
commit fcd2718794
48 changed files with 293 additions and 486 deletions
+3 -4
View File
@@ -1,6 +1,7 @@
#define _USE_MATH_DEFINES
#include "utils/color.hpp"
#include <algorithm> // Para ranges::any_of
#include <cctype> // Para isxdigit
#include <cmath> // Para sinf, fmaxf, fminf, M_PI, fmodf, roundf, fmod
#include <cstdint> // Para uint8_t
@@ -22,10 +23,8 @@ auto Color::fromHex(const std::string& hex_str) -> Color {
}
// Verificar que todos los caracteres sean hexadecimales válidos
for (char c : hex) {
if (std::isxdigit(c) == 0) {
throw std::invalid_argument("String contiene caracteres no hexadecimales");
}
if (std::ranges::any_of(hex, [](char c) { return std::isxdigit(c) == 0; })) {
throw std::invalid_argument("String contiene caracteres no hexadecimales");
}
// Convertir cada par de caracteres a valores RGB(A)
-2
View File
@@ -189,8 +189,6 @@ namespace {
{"service_menu.window_message.text_safety_margin", [](const std::string& v) -> void { param.service_menu.window_message.text_safety_margin = std::stof(v); }},
{"service_menu.window_message.animation_duration", [](const std::string& v) -> void { param.service_menu.window_message.animation_duration = std::stof(v); }}};
static const std::unordered_map<std::string, std::function<void(const std::string&)>> INT_PARAMS_EXTRA = {};
// Colores válidos para globos
static const std::unordered_map<std::string, bool> VALID_BALLOON_COLORS = {
{"blue", true},
+1 -1
View File
@@ -52,7 +52,7 @@ struct ParamBalloon {
float vel;
// Constructor por defecto
constexpr Settings(float grav_val = 0.0F, float vel_val = 0.0F)
explicit constexpr Settings(float grav_val = 0.0F, float vel_val = 0.0F)
: grav(grav_val),
vel(vel_val) {}
};