diff options
| author | 2021-04-07 01:19:26 -0400 | |
|---|---|---|
| committer | 2021-04-07 01:19:29 -0400 | |
| commit | 97e2604575459da8787a20d511d3438ac95d9f1a (patch) | |
| tree | 7d003ef0b7026c47f4e016b15b0f997750ed05c4 /src | |
| parent | Merge pull request #6141 from lat9nq/cfg_gphcs_stack_use (diff) | |
| download | yuzu-97e2604575459da8787a20d511d3438ac95d9f1a.tar.gz yuzu-97e2604575459da8787a20d511d3438ac95d9f1a.tar.xz yuzu-97e2604575459da8787a20d511d3438ac95d9f1a.zip | |
k_scheduler: Mark KScopedSchedulerLock as [[nodiscard]]
Prevents logic bugs like:
KScopedSchedulerLock{kernel};
instead of:
KScopedSchedulerLock lk{kernel};
from slipping through.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/k_scheduler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h index f595b9a5c..01c8c4b73 100644 --- a/src/core/hle/kernel/k_scheduler.h +++ b/src/core/hle/kernel/k_scheduler.h | |||
| @@ -198,7 +198,7 @@ private: | |||
| 198 | Common::SpinLock guard{}; | 198 | Common::SpinLock guard{}; |
| 199 | }; | 199 | }; |
| 200 | 200 | ||
| 201 | class KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> { | 201 | class [[nodiscard]] KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> { |
| 202 | public: | 202 | public: |
| 203 | explicit KScopedSchedulerLock(KernelCore& kernel); | 203 | explicit KScopedSchedulerLock(KernelCore& kernel); |
| 204 | ~KScopedSchedulerLock(); | 204 | ~KScopedSchedulerLock(); |