yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

k_scheduler: Mark KScopedSchedulerLock as [[nodiscard]]

Prevents logic bugs like:

KScopedSchedulerLock{kernel};

instead of:

KScopedSchedulerLock lk{kernel};

from slipping through.
This commit is contained in:
Lioncash 2021-04-07 01:19:26 -04:00
parent 7feb490f83
commit 97e2604575
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ private:
Common::SpinLock guard{};
};
class KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> {
class [[nodiscard]] KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> {
public:
explicit KScopedSchedulerLock(KernelCore& kernel);
~KScopedSchedulerLock();