summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_scoped_lock.h
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-09-24 07:21:07 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-09-24 21:52:05 +0200
commit73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83 (patch)
tree31ecba073091bae2a424f3d0b6215591408edca3 /src/core/hle/kernel/k_scoped_lock.h
parentci: Update clang format version (diff)
downloadyuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.gz
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.bz2
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.lz
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.xz
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.tar.zst
yuzu-73666fb2622a5f6a7ab9f92c9a46ce2e215c4e83.zip
Diffstat (limited to 'src/core/hle/kernel/k_scoped_lock.h')
-rw-r--r--src/core/hle/kernel/k_scoped_lock.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/core/hle/kernel/k_scoped_lock.h b/src/core/hle/kernel/k_scoped_lock.h
index 72c3b0252..4fb180fc6 100644
--- a/src/core/hle/kernel/k_scoped_lock.h
+++ b/src/core/hle/kernel/k_scoped_lock.h
@@ -13,19 +13,18 @@ namespace Kernel {
template <typename T>
concept KLockable = !std::is_reference_v<T> && requires(T & t) {
- { t.Lock() }
- ->std::same_as<void>;
- { t.Unlock() }
- ->std::same_as<void>;
+ { t.Lock() } -> std::same_as<void>;
+ { t.Unlock() } -> std::same_as<void>;
};
template <typename T>
-requires KLockable<T> class [[nodiscard]] KScopedLock {
+requires KLockable<T>
+class [[nodiscard]] KScopedLock {
public:
- explicit KScopedLock(T * l) : lock_ptr(l) {
+ 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();
@@ -34,7 +33,7 @@ public:
KScopedLock(const KScopedLock&) = delete;
KScopedLock& operator=(const KScopedLock&) = delete;
- KScopedLock(KScopedLock &&) = delete;
+ KScopedLock(KScopedLock&&) = delete;
KScopedLock& operator=(KScopedLock&&) = delete;
private: