Просмотр исходного кода

k_scoped_scheduler_lock_and_sleep: Mark class as [[nodiscard]]

Prevents logic bugs from slipping through.
Lioncash 5 лет назад
Родитель
Сommit
1e964604bb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h

+ 1 - 1
src/core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h

@@ -15,7 +15,7 @@
 
 
 namespace Kernel {
 namespace Kernel {
 
 
-class KScopedSchedulerLockAndSleep {
+class [[nodiscard]] KScopedSchedulerLockAndSleep {
 public:
 public:
     explicit KScopedSchedulerLockAndSleep(KernelCore& kernel, KThread* t, s64 timeout)
     explicit KScopedSchedulerLockAndSleep(KernelCore& kernel, KThread* t, s64 timeout)
         : kernel(kernel), thread(t), timeout_tick(timeout) {
         : kernel(kernel), thread(t), timeout_tick(timeout) {