neteja cppcheck (44 → 0) i aïllar impls de tercers

This commit is contained in:
2026-05-16 17:53:50 +02:00
parent fe186ad39a
commit e31a3e9182
20 changed files with 151 additions and 196 deletions
+4 -5
View File
@@ -2075,11 +2075,10 @@ auto MapEditor::deleteRoom() -> std::string { // NOLINT(readability-function-co
if (target == "0") {
// Buscar la primera room que no sea esta
for (const auto& r : Resource::Cache::get()->getRooms()) {
if (r.name != deleted_name) {
target = r.name;
break;
}
const auto& ROOMS = Resource::Cache::get()->getRooms();
auto it = std::ranges::find_if(ROOMS, [&](const auto& r) { return r.name != deleted_name; });
if (it != ROOMS.end()) {
target = it->name;
}
}
if (target == "0") { return "Cannot delete: no other room to navigate to"; }