diff options
| author | 2019-04-01 18:23:47 -0400 | |
|---|---|---|
| committer | 2019-04-01 18:23:50 -0400 | |
| commit | 436624173916c2aea8d0ea0e83bebb299da281b2 (patch) | |
| tree | c1b15cbe83d80e1dc17980431754a7b9ff2c24f0 /src | |
| parent | kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const (diff) | |
| download | yuzu-436624173916c2aea8d0ea0e83bebb299da281b2.tar.gz yuzu-436624173916c2aea8d0ea0e83bebb299da281b2.tar.xz yuzu-436624173916c2aea8d0ea0e83bebb299da281b2.zip | |
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().
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 0e4f6c041..87638c655 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -367,7 +367,7 @@ void Thread::ChangeScheduler() { | |||
| 367 | system.CpuCore(processor_id).PrepareReschedule(); | 367 | system.CpuCore(processor_id).PrepareReschedule(); |
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | bool Thread::AllWaitObjectsReady() { | 370 | bool Thread::AllWaitObjectsReady() const { |
| 371 | return std::none_of( | 371 | return std::none_of( |
| 372 | wait_objects.begin(), wait_objects.end(), | 372 | wait_objects.begin(), wait_objects.end(), |
| 373 | [this](const SharedPtr<WaitObject>& object) { return object->ShouldWait(this); }); | 373 | [this](const SharedPtr<WaitObject>& object) { return object->ShouldWait(this); }); |
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h index db563708b..73e5d1bb4 100644 --- a/src/core/hle/kernel/thread.h +++ b/src/core/hle/kernel/thread.h | |||
| @@ -299,7 +299,7 @@ public: | |||
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | /// Determines whether all the objects this thread is waiting on are ready. | 301 | /// Determines whether all the objects this thread is waiting on are ready. |
| 302 | bool AllWaitObjectsReady(); | 302 | bool AllWaitObjectsReady() const; |
| 303 | 303 | ||
| 304 | const MutexWaitingThreads& GetMutexWaitingThreads() const { | 304 | const MutexWaitingThreads& GetMutexWaitingThreads() const { |
| 305 | return wait_mutex_threads; | 305 | return wait_mutex_threads; |