From f71c598907ea76095dd3e2a71d160ddbe5c6635c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 16 Mar 2019 04:41:34 -0400 Subject: 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. --- src/common/thread_queue_list.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/common/thread_queue_list.h') 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 @@ #include #include -#include namespace Common { @@ -111,8 +110,9 @@ struct ThreadQueueList { } void remove(Priority priority, const T& thread_id) { - Queue* cur = &queues[priority]; - boost::remove_erase(cur->data, thread_id); + Queue* const cur = &queues[priority]; + const auto iter = std::remove(cur->data.begin(), cur->data.end(), thread_id); + cur->data.erase(iter, cur->data.end()); } void rotate(Priority priority) { -- cgit v1.2.3