diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-18 09:38:01 +0900 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2016-09-18 09:38:01 +0900 |
commit | dc8479928c5aee4c6ad6fe4f59006fb604cee701 (patch) | |
tree | 569a7f13128450bbab973236615587ff00bced5f /src/common/thread_queue_list.h | |
parent | fe948af0952d7badacbce62a8e35a3a1421245ba (diff) |
Sources: Run clang-format on everything.
Diffstat (limited to 'src/common/thread_queue_list.h')
-rw-r--r-- | src/common/thread_queue_list.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/common/thread_queue_list.h b/src/common/thread_queue_list.h index 12455d7c4b..0dcf785b65 100644 --- a/src/common/thread_queue_list.h +++ b/src/common/thread_queue_list.h @@ -11,7 +11,7 @@ namespace Common { -template<class T, unsigned int N> +template <class T, unsigned int N> struct ThreadQueueList { // TODO(yuriks): If performance proves to be a problem, the std::deques can be replaced with // (dynamically resizable) circular buffers to remove their overhead when @@ -39,7 +39,7 @@ struct ThreadQueueList { } T get_first() { - Queue *cur = first; + Queue* cur = first; while (cur != nullptr) { if (!cur->data.empty()) { return cur->data.front(); @@ -51,7 +51,7 @@ struct ThreadQueueList { } T pop_first() { - Queue *cur = first; + Queue* cur = first; while (cur != nullptr) { if (!cur->data.empty()) { auto tmp = std::move(cur->data.front()); @@ -65,8 +65,8 @@ struct ThreadQueueList { } T pop_first_better(Priority priority) { - Queue *cur = first; - Queue *stop = &queues[priority]; + Queue* cur = first; + Queue* stop = &queues[priority]; while (cur < stop) { if (!cur->data.empty()) { auto tmp = std::move(cur->data.front()); @@ -80,12 +80,12 @@ struct ThreadQueueList { } void push_front(Priority priority, const T& thread_id) { - Queue *cur = &queues[priority]; + Queue* cur = &queues[priority]; cur->data.push_front(thread_id); } void push_back(Priority priority, const T& thread_id) { - Queue *cur = &queues[priority]; + Queue* cur = &queues[priority]; cur->data.push_back(thread_id); } @@ -96,12 +96,12 @@ struct ThreadQueueList { } void remove(Priority priority, const T& thread_id) { - Queue *cur = &queues[priority]; + Queue* cur = &queues[priority]; boost::remove_erase(cur->data, thread_id); } void rotate(Priority priority) { - Queue *cur = &queues[priority]; + Queue* cur = &queues[priority]; if (cur->data.size() > 1) { cur->data.push_back(std::move(cur->data.front())); @@ -115,7 +115,7 @@ struct ThreadQueueList { } bool empty(Priority priority) const { - const Queue *cur = &queues[priority]; + const Queue* cur = &queues[priority]; return cur->data.empty(); } @@ -139,7 +139,7 @@ private: } void link(Priority priority) { - Queue *cur = &queues[priority]; + Queue* cur = &queues[priority]; for (int i = priority - 1; i >= 0; --i) { if (queues[i].next_nonempty != UnlinkedTag()) { |