summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-03-16 04:41:34 -0400
committerGravatar Lioncash2019-03-16 05:01:39 -0400
commitf71c598907ea76095dd3e2a71d160ddbe5c6635c (patch)
treec8d7816de761adcbeec2d9613c1fdd0046b180f7
parentMerge pull request #2241 from lioncash/compile-flags (diff)
downloadyuzu-f71c598907ea76095dd3e2a71d160ddbe5c6635c.tar.gz
yuzu-f71c598907ea76095dd3e2a71d160ddbe5c6635c.tar.xz
yuzu-f71c598907ea76095dd3e2a71d160ddbe5c6635c.zip
common/thread_queue_list: Remove unnecessary dependency on boost
We really don't need to pull in several headers of boost related machinery just to perform the erase-remove idiom (particularly with C++20 around the corner, which adds universal container std::erase and std::erase_if, which we can just use instead). With this, we don't need to link in anything boost-related into common.
-rw-r--r--src/common/CMakeLists.txt2
-rw-r--r--src/common/thread_queue_list.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 3d30f0e3e..fecef967b 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -128,4 +128,4 @@ endif()
128 128
129create_target_directory_groups(common) 129create_target_directory_groups(common)
130 130
131target_link_libraries(common PUBLIC Boost::boost fmt microprofile) 131target_link_libraries(common PUBLIC fmt microprofile)
diff --git a/src/common/thread_queue_list.h b/src/common/thread_queue_list.h
index e7594db68..791f99a8c 100644
--- a/src/common/thread_queue_list.h
+++ b/src/common/thread_queue_list.h
@@ -6,7 +6,6 @@
6 6
7#include <array> 7#include <array>
8#include <deque> 8#include <deque>
9#include <boost/range/algorithm_ext/erase.hpp>
10 9
11namespace Common { 10namespace Common {
12 11
@@ -111,8 +110,9 @@ struct ThreadQueueList {
111 } 110 }
112 111
113 void remove(Priority priority, const T& thread_id) { 112 void remove(Priority priority, const T& thread_id) {
114 Queue* cur = &queues[priority]; 113 Queue* const cur = &queues[priority];
115 boost::remove_erase(cur->data, thread_id); 114 const auto iter = std::remove(cur->data.begin(), cur->data.end(), thread_id);
115 cur->data.erase(iter, cur->data.end());
116 } 116 }
117 117
118 void rotate(Priority priority) { 118 void rotate(Priority priority) {