diff options
author | Chris Robinson <[email protected]> | 2019-01-01 16:38:54 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-01-01 16:42:54 -0800 |
commit | 1630a33567b155718b7cb984badb378b140f0889 (patch) | |
tree | 09e043b8c0c90d958431b3ef816c952511b8ad0d /Alc/backends/base.h | |
parent | 2f1566e0b4e71f9b03ae8081e81a85f52ddeab23 (diff) |
Use standard unique_lock and lock_guard for the backend lock
Diffstat (limited to 'Alc/backends/base.h')
-rw-r--r-- | Alc/backends/base.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Alc/backends/base.h b/Alc/backends/base.h index fc50af2b..93685d5a 100644 --- a/Alc/backends/base.h +++ b/Alc/backends/base.h @@ -41,8 +41,8 @@ struct BackendBase { virtual ClockLatency getClockLatency(); - virtual void lock() { mMutex.lock(); }; - virtual void unlock() { mMutex.unlock(); }; + virtual void lock() { mMutex.lock(); } + virtual void unlock() { mMutex.unlock(); } ALCdevice *mDevice; @@ -52,6 +52,8 @@ struct BackendBase { virtual ~BackendBase(); }; using BackendPtr = std::unique_ptr<BackendBase>; +using BackendUniqueLock = std::unique_lock<BackendBase>; +using BackendLockGuard = std::lock_guard<BackendBase>; enum class BackendType { Playback, |