clang-tidy (amb el fuck de que no feien bona parella el clang de macos i el tidy de llvm)

This commit is contained in:
2026-03-23 12:03:07 +01:00
parent 3ca744ee46
commit a1d17ccf99
72 changed files with 487 additions and 484 deletions

View File

@@ -22,15 +22,15 @@ auto createPath(float start, float end, PathType type, float fixed_pos, int step
double value = start + ((end - start) * easing_function(t));
if ((start > 0 && end < 0) || (start < 0 && end > 0)) {
value = start + (end > 0 ? 1 : -1) * std::abs(end - start) * easing_function(t);
value = start + ((end > 0 ? 1 : -1) * std::abs(end - start) * easing_function(t));
}
switch (type) {
case PathType::HORIZONTAL:
v.emplace_back(SDL_FPoint{static_cast<float>(value), fixed_pos});
v.emplace_back(SDL_FPoint{.x = static_cast<float>(value), .y = fixed_pos});
break;
case PathType::VERTICAL:
v.emplace_back(SDL_FPoint{fixed_pos, static_cast<float>(value)});
v.emplace_back(SDL_FPoint{.x = fixed_pos, .y = static_cast<float>(value)});
break;
default:
break;
@@ -167,7 +167,7 @@ void PathSprite::moveThroughCurrentPath(float delta_time) {
if (!path.on_destination) {
++path.counter;
if (path.counter >= static_cast<int>(path.spots.size())) {
if (std::cmp_greater_equal(path.counter, path.spots.size())) {
path.on_destination = true;
path.counter = static_cast<int>(path.spots.size()) - 1;
}
@@ -223,7 +223,7 @@ void PathSprite::goToNextPathOrDie() {
}
// Comprueba si quedan mas recorridos
if (current_path_ >= static_cast<int>(paths_.size())) {
if (std::cmp_greater_equal(current_path_, paths_.size())) {
has_finished_ = true;
current_path_ = 0;
}