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

kernel/thread: Make AllWaitObjectsReady() a const qualified member function

Now that ShouldWait() is a const qualified member function, this one can
be made const qualified as well, since it can handle passing a const
qualified this pointer to ShouldWait().
Lioncash 7 лет назад
Родитель
Сommit
4366241739
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      src/core/hle/kernel/thread.cpp
  2. 1 1
      src/core/hle/kernel/thread.h

+ 1 - 1
src/core/hle/kernel/thread.cpp

@@ -367,7 +367,7 @@ void Thread::ChangeScheduler() {
     system.CpuCore(processor_id).PrepareReschedule();
     system.CpuCore(processor_id).PrepareReschedule();
 }
 }
 
 
-bool Thread::AllWaitObjectsReady() {
+bool Thread::AllWaitObjectsReady() const {
     return std::none_of(
     return std::none_of(
         wait_objects.begin(), wait_objects.end(),
         wait_objects.begin(), wait_objects.end(),
         [this](const SharedPtr<WaitObject>& object) { return object->ShouldWait(this); });
         [this](const SharedPtr<WaitObject>& object) { return object->ShouldWait(this); });

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

@@ -299,7 +299,7 @@ public:
     }
     }
 
 
     /// Determines whether all the objects this thread is waiting on are ready.
     /// Determines whether all the objects this thread is waiting on are ready.
-    bool AllWaitObjectsReady();
+    bool AllWaitObjectsReady() const;
 
 
     const MutexWaitingThreads& GetMutexWaitingThreads() const {
     const MutexWaitingThreads& GetMutexWaitingThreads() const {
         return wait_mutex_threads;
         return wait_mutex_threads;