From 7cde5b83bc9c2dc178bca9fa16ebb28657456b81 Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 6 Dec 2016 19:31:53 -0500 Subject: Use boost remove_erase_if instead of the erase-remove idiom --- src/core/hle/kernel/kernel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 07f420099..b8b69f9d0 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include +#include #include "common/assert.h" #include "common/logging/log.h" #include "core/hle/config_mem.h" @@ -33,9 +34,9 @@ void WaitObject::RemoveWaitingThread(Thread* thread) { SharedPtr WaitObject::GetHighestPriorityReadyThread() { // Remove the threads that are ready or already running from our waitlist - waiting_threads.erase(std::remove_if(waiting_threads.begin(), waiting_threads.end(), [](const SharedPtr& thread) -> bool { + boost::range::remove_erase_if(waiting_threads, [](const SharedPtr& thread) -> bool { return thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_READY; - }), waiting_threads.end()); + }); if (waiting_threads.empty()) return nullptr; -- cgit v1.2.3