diff options
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/Collision/Management/VMapManager2.cpp | 8 | ||||
| -rw-r--r-- | src/common/Collision/Maps/MapTree.cpp | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/common/Collision/Management/VMapManager2.cpp b/src/common/Collision/Management/VMapManager2.cpp index df4ac1b4859..9ee1d5a0b3f 100644 --- a/src/common/Collision/Management/VMapManager2.cpp +++ b/src/common/Collision/Management/VMapManager2.cpp @@ -323,11 +323,11 @@ namespace VMAP WorldModel* worldmodel = new WorldModel(); if (!worldmodel->readFile(basepath + filename + ".vmo")) { - TC_LOG_ERROR("misc", "VMapManager2: could not load '%s%s.vmo'", basepath.c_str(), filename.c_str()); + TC_LOG_ERROR("misc", "VMapManager2: could not load '{}{}.vmo'", basepath, filename); delete worldmodel; return nullptr; } - TC_LOG_DEBUG("maps", "VMapManager2: loading file '%s%s'", basepath.c_str(), filename.c_str()); + TC_LOG_DEBUG("maps", "VMapManager2: loading file '{}{}'", basepath, filename); worldmodel->Flags = flags; @@ -346,12 +346,12 @@ namespace VMAP ModelFileMap::iterator model = iLoadedModelFiles.find(filename); if (model == iLoadedModelFiles.end()) { - TC_LOG_ERROR("misc", "VMapManager2: trying to unload non-loaded file '%s'", filename.c_str()); + TC_LOG_ERROR("misc", "VMapManager2: trying to unload non-loaded file '{}'", filename); return; } if (model->second.decRefCount() == 0) { - TC_LOG_DEBUG("maps", "VMapManager2: unloading file '%s'", filename.c_str()); + TC_LOG_DEBUG("maps", "VMapManager2: unloading file '{}'", filename); delete model->second.getModel(); iLoadedModelFiles.erase(model); } diff --git a/src/common/Collision/Maps/MapTree.cpp b/src/common/Collision/Maps/MapTree.cpp index e0166a9de1a..b023e134cd3 100644 --- a/src/common/Collision/Maps/MapTree.cpp +++ b/src/common/Collision/Maps/MapTree.cpp @@ -277,7 +277,7 @@ namespace VMAP bool StaticMapTree::InitMap(const std::string &fname, VMapManager2* vm) { - TC_LOG_DEBUG("maps", "StaticMapTree::InitMap() : initializing StaticMapTree '%s'", fname.c_str()); + TC_LOG_DEBUG("maps", "StaticMapTree::InitMap() : initializing StaticMapTree '{}'", fname); bool success = false; std::string fullname = iBasePath + fname; FILE* rf = fopen(fullname.c_str(), "rb"); @@ -306,7 +306,7 @@ namespace VMAP if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn)) { WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags); - TC_LOG_DEBUG("maps", "StaticMapTree::InitMap() : loading %s", spawn.name.c_str()); + TC_LOG_DEBUG("maps", "StaticMapTree::InitMap() : loading {}", spawn.name); if (model) { // assume that global model always is the first and only tree value (could be improved...) @@ -316,7 +316,7 @@ namespace VMAP else { success = false; - TC_LOG_ERROR("misc", "StaticMapTree::InitMap() : could not acquire WorldModel pointer for '%s'", spawn.name.c_str()); + TC_LOG_ERROR("misc", "StaticMapTree::InitMap() : could not acquire WorldModel pointer for '{}'", spawn.name); } } @@ -351,7 +351,7 @@ namespace VMAP } if (!iTreeValues) { - TC_LOG_ERROR("misc", "StaticMapTree::LoadMapTile() : tree has not been initialized [%u, %u]", tileX, tileY); + TC_LOG_ERROR("misc", "StaticMapTree::LoadMapTile() : tree has not been initialized [{}, {}]", tileX, tileY); return false; } bool result = true; @@ -377,7 +377,7 @@ namespace VMAP // acquire model instance WorldModel* model = vm->acquireModelInstance(iBasePath, spawn.name, spawn.flags); if (!model) - TC_LOG_ERROR("misc", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [%u, %u]", tileX, tileY); + TC_LOG_ERROR("misc", "StaticMapTree::LoadMapTile() : could not acquire WorldModel pointer [{}, {}]", tileX, tileY); // update tree uint32 referencedVal; @@ -388,7 +388,7 @@ namespace VMAP { if (referencedVal > iNTreeValues) { - TC_LOG_ERROR("maps", "StaticMapTree::LoadMapTile() : invalid tree element (%u/%u) referenced in tile %s", referencedVal, iNTreeValues, tilefile.c_str()); + TC_LOG_ERROR("maps", "StaticMapTree::LoadMapTile() : invalid tree element ({}/{}) referenced in tile {}", referencedVal, iNTreeValues, tilefile); continue; } @@ -428,7 +428,7 @@ namespace VMAP loadedTileMap::iterator tile = iLoadedTiles.find(tileID); if (tile == iLoadedTiles.end()) { - TC_LOG_ERROR("misc", "StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:%u X:%u Y:%u", iMapID, tileX, tileY); + TC_LOG_ERROR("misc", "StaticMapTree::UnloadMapTile() : trying to unload non-loaded tile - Map:{} X:{} Y:{}", iMapID, tileX, tileY); return; } if (tile->second) // file associated with tile @@ -462,7 +462,7 @@ namespace VMAP else { if (!iLoadedSpawns.count(referencedNode)) - TC_LOG_ERROR("misc", "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '%s' (ID:%u)", spawn.name.c_str(), spawn.ID); + TC_LOG_ERROR("misc", "StaticMapTree::UnloadMapTile() : trying to unload non-referenced model '{}' (ID:{})", spawn.name, spawn.ID); else if (--iLoadedSpawns[referencedNode] == 0) { iTreeValues[referencedNode].setUnloaded(); |
