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)