summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_scoped_lock.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-09-24 22:44:25 +0200
committerGitHub <noreply@github.com>2021-09-24 22:44:25 +0200
commit9a53173e4de2194a128a33764d3f50f02f358efa (patch)
tree6f6cf76701e48f6c83e105ab06b2e6f82627dbf9 /src/core/hle/kernel/k_scoped_lock.h
parentMerge pull request #7069 from lioncash/uuid (diff)
parentCMakeLists: Update to clang format version 12 (diff)
downloadyuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar
yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.gz
yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.bz2
yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.lz
yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.xz
yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.tar.zst
yuzu-9a53173e4de2194a128a33764d3f50f02f358efa.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: