summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/kernel/thread.cpp4
-rw-r--r--src/core/hle/kernel/thread.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index fa3ac3abc..937b41767 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -229,9 +229,9 @@ void Thread::SetWaitSynchronizationOutput(s32 output) {
229 context.cpu_registers[1] = output; 229 context.cpu_registers[1] = output;
230} 230}
231 231
232s32 Thread::GetWaitObjectIndex(WaitObject* object) const { 232s32 Thread::GetWaitObjectIndex(const WaitObject* object) const {
233 ASSERT_MSG(!wait_objects.empty(), "Thread is not waiting for anything"); 233 ASSERT_MSG(!wait_objects.empty(), "Thread is not waiting for anything");
234 auto match = std::find(wait_objects.rbegin(), wait_objects.rend(), object); 234 const auto match = std::find(wait_objects.rbegin(), wait_objects.rend(), object);
235 return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1); 235 return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1);
236} 236}
237 237
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 9c684758c..1e36a9615 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -205,7 +205,7 @@ public:
205 * object in the list. 205 * object in the list.
206 * @param object Object to query the index of. 206 * @param object Object to query the index of.
207 */ 207 */
208 s32 GetWaitObjectIndex(WaitObject* object) const; 208 s32 GetWaitObjectIndex(const WaitObject* object) const;
209 209
210 /** 210 /**
211 * Stops a thread, invalidating it from further use 211 * Stops a thread, invalidating it from further use