summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorSubv <subv2112@gmail.com>2016-12-07 01:31:53 +0100
committerSubv <subv2112@gmail.com>2016-12-07 01:31:53 +0100
commit7cde5b83bc9c2dc178bca9fa16ebb28657456b81 (patch)
treefa7a3420d9fbf89d27ca5f035228279f54919190 /src/core/hle
parentImproved the algorithm for GetHighestPriorityReadyThread. (diff)
downloadyuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.tar
yuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.tar.gz
yuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.tar.bz2
yuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.tar.lz
yuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.tar.xz
yuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.tar.zst
yuzu-7cde5b83bc9c2dc178bca9fa16ebb28657456b81.zip
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/kernel.cpp5
1 files changed, 3 insertions, 2 deletions
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 <algorithm>
+#include <boost/range/algorithm_ext/erase.hpp>
#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<Thread> 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>& thread) -> bool {
+ boost::range::remove_erase_if(waiting_threads, [](const SharedPtr<Thread>& thread) -> bool {
return thread->status == THREADSTATUS_RUNNING || thread->status == THREADSTATUS_READY;
- }), waiting_threads.end());
+ });
if (waiting_threads.empty())
return nullptr;