fix: enum class amb base std::uint8_t (33 troballes)

This commit is contained in:
2026-05-14 22:32:57 +02:00
parent 058f7b118a
commit ac93cfa7d7
35 changed files with 120 additions and 113 deletions

View File

@@ -2,7 +2,7 @@
#include <SDL3/SDL.h>
#include <cmath> // Para std::sqrt, std::min
#include <cmath> // Para std::sqrt, std::min
#include <numeric> // Para std::accumulate
#include <utility>
#include <vector> // Para vector
@@ -867,8 +867,7 @@ auto Game::checkEndGame() -> bool {
// Obtiene la cantidad total de items que hay en el mapeado del juego
auto Game::getTotalItems() -> int {
const auto& rooms = Resource::Cache::get()->getRooms();
return static_cast<int>(std::accumulate(rooms.begin(), rooms.end(), size_t{0},
[](size_t acc, const auto& room) { return acc + room.room->items.size(); }));
return static_cast<int>(std::accumulate(rooms.begin(), rooms.end(), size_t{0}, [](size_t acc, const auto& room) { return acc + room.room->items.size(); }));
}
// Pone el juego en pausa