Use scoped_lock, etc

This commit is contained in:
TuxSH
2018-11-05 14:12:38 +01:00
committed by Michael Scire
parent 698fa9fcb0
commit cd1f74154d
7 changed files with 21 additions and 21 deletions

View File

@@ -51,13 +51,13 @@ class KObjectAllocator {
void RegisterObject(T &obj) noexcept
{
std::lock_guard guard{mutex};
std::scoped_lock guard{mutex};
allocatedSet.insert(obj);
}
void UnregisterObject(T &obj) noexcept
{
std::lock_guard guard{mutex};
std::scoped_lock guard{mutex};
allocatedSet.erase(obj);
}