From bf9db1fe3d611137448c0eb99978c8906531ffc1 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 26 Nov 2018 20:34:16 -0800 Subject: Remove althrd_t from Windows --- common/uintmap.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 common/uintmap.h (limited to 'common/uintmap.h') diff --git a/common/uintmap.h b/common/uintmap.h deleted file mode 100644 index 0646d2b5..00000000 --- a/common/uintmap.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef AL_UINTMAP_H -#define AL_UINTMAP_H - -#include -#include - -#include "AL/al.h" - -template -class ThrSafeMap { - std::unordered_map mValues; - std::mutex mLock; - -public: - void InsertEntry(T0 key, T1 value) noexcept - { - std::lock_guard _{mLock}; - mValues[key] = value; - } - - T1 RemoveKey(T0 key) noexcept - { - T1 retval{}; - - std::lock_guard _{mLock}; - auto iter = mValues.find(key); - if(iter != mValues.end()) - retval = iter->second; - mValues.erase(iter); - - return retval; - } -}; - -#endif /* AL_UINTMAP_H */ -- cgit v1.2.3