Use scoped_lock, etc

This commit is contained in:
TuxSH authored and Michael Scire committed 2019-06-03 17:41:03 -07:00
1 parent 698fa9fcb0
commit cd1f74154d
7 files changed
+21 -21

No files matched your search

@@ -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);
}