fix: const a punters i refs (13 troballes)
This commit is contained in:
@@ -1278,7 +1278,7 @@ auto MapEditor::createNewRoom(const std::string& direction) -> std::string { //
|
||||
|
||||
// Comprobar que no hay ya una room en esa dirección
|
||||
if (!direction.empty()) {
|
||||
std::string* existing = nullptr;
|
||||
const std::string* existing = nullptr;
|
||||
if (direction == "UP") {
|
||||
existing = &room_data_.upper_room;
|
||||
} else if (direction == "DOWN") {
|
||||
@@ -1294,7 +1294,7 @@ auto MapEditor::createNewRoom(const std::string& direction) -> std::string { //
|
||||
}
|
||||
|
||||
// Encontrar el primer número libre (reutiliza huecos)
|
||||
auto& rooms = Resource::Cache::get()->getRooms();
|
||||
const auto& rooms = Resource::Cache::get()->getRooms();
|
||||
std::set<int> used;
|
||||
for (const auto& r : rooms) {
|
||||
try {
|
||||
|
||||
@@ -79,7 +79,7 @@ void MiniMap::buildTileColorTable(const std::string& tileset_name) {
|
||||
|
||||
// Posiciona las rooms en un grid usando BFS desde las conexiones
|
||||
void MiniMap::layoutRooms() {
|
||||
auto& rooms = Resource::Cache::get()->getRooms();
|
||||
const auto& rooms = Resource::Cache::get()->getRooms();
|
||||
if (rooms.empty()) { return; }
|
||||
|
||||
// Mapa de nombre → Room::Data
|
||||
|
||||
Reference in New Issue
Block a user