aboutsummaryrefslogtreecommitdiff
path: root/src/common/Collision/Management/VMapManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Collision/Management/VMapManager.cpp')
-rw-r--r--src/common/Collision/Management/VMapManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/Collision/Management/VMapManager.cpp b/src/common/Collision/Management/VMapManager.cpp
index 57d68708f46..98137de183d 100644
--- a/src/common/Collision/Management/VMapManager.cpp
+++ b/src/common/Collision/Management/VMapManager.cpp
@@ -273,7 +273,7 @@ namespace VMAP
std::shared_ptr<ManagedModel> worldmodel; // this is intentionally declared before lock so that it is destroyed after it to prevent deadlocks in releaseModelInstance
//! Critical section, thread safe access to iLoadedModelFiles
- std::lock_guard lock(LoadedModelFilesLock);
+ std::scoped_lock lock(LoadedModelFilesLock);
auto& [key, model] = *iLoadedModelFiles.try_emplace(filename).first;
worldmodel = model.lock();
@@ -296,7 +296,7 @@ namespace VMAP
void VMapManager::releaseModelInstance(std::string const& filename)
{
//! Critical section, thread safe access to iLoadedModelFiles
- std::lock_guard lock(LoadedModelFilesLock);
+ std::scoped_lock lock(LoadedModelFilesLock);
TC_LOG_DEBUG("maps", "VMapManager: unloading file '{}'", filename);