mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-26 13:35:33 +00:00
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:
parent
7feb490f83
commit
97e2604575
|
@ -198,7 +198,7 @@ private:
|
||||||
Common::SpinLock guard{};
|
Common::SpinLock guard{};
|
||||||
};
|
};
|
||||||
|
|
||||||
class KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> {
|
class [[nodiscard]] KScopedSchedulerLock : KScopedLock<GlobalSchedulerContext::LockType> {
|
||||||
public:
|
public:
|
||||||
explicit KScopedSchedulerLock(KernelCore& kernel);
|
explicit KScopedSchedulerLock(KernelCore& kernel);
|
||||||
~KScopedSchedulerLock();
|
~KScopedSchedulerLock();
|
||||||
|
|
Loading…
Reference in a new issue