summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-21 00:40:01 +0100
committerbunnei <bunneidev@gmail.com>2015-01-22 02:48:46 +0100
commit4255f25647dee3ae6098d14adbb3db0749935120 (patch)
treed67f194bbe37c9d3e8836914ff52fb2b537cf8b3
parentMutex: Cleanup and remove redundant code. (diff)
downloadyuzu-4255f25647dee3ae6098d14adbb3db0749935120.tar
yuzu-4255f25647dee3ae6098d14adbb3db0749935120.tar.gz
yuzu-4255f25647dee3ae6098d14adbb3db0749935120.tar.bz2
yuzu-4255f25647dee3ae6098d14adbb3db0749935120.tar.lz
yuzu-4255f25647dee3ae6098d14adbb3db0749935120.tar.xz
yuzu-4255f25647dee3ae6098d14adbb3db0749935120.tar.zst
yuzu-4255f25647dee3ae6098d14adbb3db0749935120.zip
-rw-r--r--src/core/hle/kernel/thread.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 3ca9603c2..58523e145 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -85,10 +85,11 @@ static void ChangeReadyState(Thread* t, bool ready) {
/// Check if a thread is waiting on a the specified wait object
static bool CheckWait_WaitObject(const Thread* thread, WaitObject* wait_object) {
- for (auto itr = thread->wait_objects.begin(); itr != thread->wait_objects.end(); ++itr) {
- if (*itr == wait_object)
- return (thread->IsWaiting());
- }
+ auto itr = std::find(thread->wait_objects.begin(), thread->wait_objects.end(), wait_object);
+
+ if (itr != thread->wait_objects.end())
+ return thread->IsWaiting();
+
return false;
}