mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-09-07 09:49:08 +01:00
k_scoped_lock: Mark class as [[nodiscard]]
Prevents logic bugs of the kind described in the previous commit from slipping through.
This commit is contained in:
parent
97e2604575
commit
bc30aa8249
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ concept KLockable = !std::is_reference_v<T> && requires(T & t) {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
requires KLockable<T> class KScopedLock {
|
requires KLockable<T> class [[nodiscard]] KScopedLock {
|
||||||
public:
|
public:
|
||||||
explicit KScopedLock(T* l) : lock_ptr(l) {
|
explicit KScopedLock(T* l) : lock_ptr(l) {
|
||||||
this->lock_ptr->Lock();
|
this->lock_ptr->Lock();
|
||||||
|
|
Loading…
Reference in a new issue