Browse Source

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().
nce_cpp
Lioncash 7 years ago
parent
commit
ccc6f2ce01
  1. 2
      src/core/hle/kernel/thread.cpp
  2. 2
      src/core/hle/kernel/thread.h

2
src/core/hle/kernel/thread.cpp

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

2
src/core/hle/kernel/thread.h

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

Loading…
Cancel
Save