From ed982877bda2d74a02580a3f83b510d5b2e4233c Mon Sep 17 00:00:00 2001 From: TuxSH Date: Thu, 1 Nov 2018 19:47:32 +0100 Subject: [PATCH] Remove bugous MLQ reverse iterator --- .../mesosphere/threading/KMultiLevelQueue.hpp | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/mesosphere/include/mesosphere/threading/KMultiLevelQueue.hpp b/mesosphere/include/mesosphere/threading/KMultiLevelQueue.hpp index b724aa745..3b899651d 100644 --- a/mesosphere/include/mesosphere/threading/KMultiLevelQueue.hpp +++ b/mesosphere/include/mesosphere/threading/KMultiLevelQueue.hpp @@ -156,8 +156,6 @@ public: using iterator = iterator_impl; using const_iterator = iterator_impl; - using reverse_iterator = std::reverse_iterator; - using const_reverse_iterator = std::reverse_iterator; void add(reference r) { uint prio = prioGetter(r); @@ -307,24 +305,9 @@ public: return minPrio == depth - 1 ? iterator{*this, depth} : begin(minPrio + 1); } - const_reverse_iterator crbegin(uint maxPrio = 0) const { - return const_reverse_iterator(cbegin(maxPrio)); - } - const_reverse_iterator rbegin(uint maxPrio = 0) const { - return crbegin(maxPrio); - } - reverse_iterator rbegin(uint maxPrio = 0) { - return reverse_iterator(begin(maxPrio)); - } - - const_reverse_iterator crend(uint minPrio = KMultiLevelQueue::depth - 1) const { - return const_reverse_iterator(cend(minPrio)); - } - const_reverse_iterator rend(uint minPrio = KMultiLevelQueue::depth - 1) const { - return crend(minPrio); - } - reverse_iterator rend(uint minPrio = KMultiLevelQueue::depth - 1) { - return reverse_iterator(end(minPrio)); + void swap(KMultiLevelQueue &other) + { + std::swap(*this, other); } KMultiLevelQueue(PrioGetterType prioGetter) : prioGetter(prioGetter), usedPriorities(0), levels() {};