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

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().
This commit is contained in:
Lioncash 2019-04-01 18:23:47 -04:00
parent 20cc0b8d3c
commit 4366241739
2 changed files with 2 additions and 2 deletions

View File

@ -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); });

View File

@ -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;