diff options
author | Lioncash <mathew1800@gmail.com> | 2021-04-07 07:37:59 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-04-07 07:52:08 +0200 |
commit | 530a5a1d099805c5fc2cfa1a31229c3f8e7dd019 (patch) | |
tree | 09485881ac10eeba02bd2840c6962b412f2dd1de | |
parent | k_scoped_scheduler_lock_and_sleep: Mark class as [[nodiscard]] (diff) | |
download | yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.tar yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.tar.gz yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.tar.bz2 yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.tar.lz yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.tar.xz yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.tar.zst yuzu-530a5a1d099805c5fc2cfa1a31229c3f8e7dd019.zip |
-rw-r--r-- | src/core/hle/kernel/k_scheduler.h | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/k_scoped_lock.h | 6 | ||||
-rw-r--r-- | src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h index 01c8c4b73..70d6bfcee 100644 --- a/src/core/hle/kernel/k_scheduler.h +++ b/src/core/hle/kernel/k_scheduler.h @@ -200,7 +200,7 @@ private: class [[nodiscard]] KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> { public: - explicit KScopedSchedulerLock(KernelCore& kernel); + explicit KScopedSchedulerLock(KernelCore & kernel); ~KScopedSchedulerLock(); }; diff --git a/src/core/hle/kernel/k_scoped_lock.h b/src/core/hle/kernel/k_scoped_lock.h index 7a1035b8c..72c3b0252 100644 --- a/src/core/hle/kernel/k_scoped_lock.h +++ b/src/core/hle/kernel/k_scoped_lock.h @@ -22,10 +22,10 @@ concept KLockable = !std::is_reference_v<T> && requires(T & t) { template <typename T> 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 +34,7 @@ public: KScopedLock(const KScopedLock&) = delete; KScopedLock& operator=(const KScopedLock&) = delete; - KScopedLock(KScopedLock&&) = delete; + KScopedLock(KScopedLock &&) = delete; KScopedLock& operator=(KScopedLock&&) = delete; private: diff --git a/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h b/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h index 4a35842c5..ebecf0c77 100644 --- a/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h +++ b/src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h @@ -17,7 +17,7 @@ namespace Kernel { class [[nodiscard]] KScopedSchedulerLockAndSleep { public: - explicit KScopedSchedulerLockAndSleep(KernelCore& kernel, KThread* t, s64 timeout) + explicit KScopedSchedulerLockAndSleep(KernelCore & kernel, KThread * t, s64 timeout) : kernel(kernel), thread(t), timeout_tick(timeout) { // Lock the scheduler. kernel.GlobalSchedulerContext().scheduler_lock.Lock(); |