clang-tidy

This commit is contained in:
2025-08-17 10:20:41 +02:00
parent b359a73d50
commit 8ddc5d94f1
73 changed files with 867 additions and 833 deletions

View File

@@ -181,17 +181,17 @@ auto Item::getCoffeeMachineSpawn(int player_x, int item_width, int area_width, i
// Ambos lados disponibles, elegir aleatoriamente
if (rand() % 2 == 0) {
// Lado izquierdo
return rand() % (exclude_left - LEFT_BOUND) + LEFT_BOUND;
return (rand() % (exclude_left - LEFT_BOUND)) + LEFT_BOUND;
} // Lado derecho
return rand() % (RIGHT_BOUND - exclude_right) + exclude_right;
return (rand() % (RIGHT_BOUND - exclude_right)) + exclude_right;
}
if (can_spawn_left) {
// Solo lado izquierdo disponible
return rand() % (exclude_left - LEFT_BOUND) + LEFT_BOUND;
return (rand() % (exclude_left - LEFT_BOUND)) + LEFT_BOUND;
}
if (can_spawn_right) {
// Solo lado derecho disponible
return rand() % (RIGHT_BOUND - exclude_right) + exclude_right;
return (rand() % (RIGHT_BOUND - exclude_right)) + exclude_right;
} // No hay espacio suficiente lejos del jugador
// Por ahora, intentar spawn en el extremo más lejano posible
int distance_to_left = abs(player_x - LEFT_BOUND);