diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/kernel/k_scoped_lock.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_scoped_lock.h b/src/core/hle/kernel/k_scoped_lock.h index 543555680..7a1035b8c 100644 --- a/src/core/hle/kernel/k_scoped_lock.h +++ b/src/core/hle/kernel/k_scoped_lock.h @@ -25,14 +25,17 @@ public: explicit KScopedLock(T* l) : lock_ptr(l) { this->lock_ptr->Lock(); } - explicit KScopedLock(T& l) : KScopedLock(std::addressof(l)) { /* ... */ - } + explicit KScopedLock(T& l) : KScopedLock(std::addressof(l)) {} + ~KScopedLock() { this->lock_ptr->Unlock(); } KScopedLock(const KScopedLock&) = delete; + KScopedLock& operator=(const KScopedLock&) = delete; + KScopedLock(KScopedLock&&) = delete; + KScopedLock& operator=(KScopedLock&&) = delete; private: T* lock_ptr; |