mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-13 17:39:58 +00:00
k_scoped_lock: delete copy and move assignment operators
If we delete the copy and move constructor, we should also be deleting the copy and move assignment operators (and even if this were intended, it would be pretty odd to not document why it's done this way).
This commit is contained in:
parent
bc30aa8249
commit
c018769016
1 changed files with 5 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue