diff options
author | Lioncash <mathew1800@gmail.com> | 2019-04-01 23:48:31 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-04-01 23:48:33 +0200 |
commit | 26d03811615e8d021435691c7ae599ac169792ef (patch) | |
tree | 09b59f21d456cbe1b4c93356a482f1455c41abe9 | |
parent | Merge pull request #2301 from FearlessTobi/remove-amiibo-setting (diff) | |
download | yuzu-26d03811615e8d021435691c7ae599ac169792ef.tar yuzu-26d03811615e8d021435691c7ae599ac169792ef.tar.gz yuzu-26d03811615e8d021435691c7ae599ac169792ef.tar.bz2 yuzu-26d03811615e8d021435691c7ae599ac169792ef.tar.lz yuzu-26d03811615e8d021435691c7ae599ac169792ef.tar.xz yuzu-26d03811615e8d021435691c7ae599ac169792ef.tar.zst yuzu-26d03811615e8d021435691c7ae599ac169792ef.zip |
-rw-r--r-- | src/core/hle/kernel/thread.cpp | 4 | ||||
-rw-r--r-- | src/core/hle/kernel/thread.h | 2 |
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) { context.cpu_registers[1] = output; } -s32 Thread::GetWaitObjectIndex(WaitObject* object) const { +s32 Thread::GetWaitObjectIndex(const WaitObject* object) const { ASSERT_MSG(!wait_objects.empty(), "Thread is not waiting for anything"); - auto match = std::find(wait_objects.rbegin(), wait_objects.rend(), object); + const auto match = std::find(wait_objects.rbegin(), wait_objects.rend(), object); return static_cast<s32>(std::distance(match, wait_objects.rend()) - 1); } 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: * object in the list. * @param object Object to query the index of. */ - s32 GetWaitObjectIndex(WaitObject* object) const; + s32 GetWaitObjectIndex(const WaitObject* object) const; /** * Stops a thread, invalidating it from further use |