]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mclock: remove (unused) unsafe use of move
authorCasey Bodley <cbodley@redhat.com>
Wed, 21 Mar 2018 18:28:58 +0000 (14:28 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 21 Mar 2018 18:30:54 +0000 (14:30 -0400)
'next->second' had already been moved into the callback

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/mClockPriorityQueue.h

index 2f719f4a7d57397e9e472b3bbe1cf3e73391d4c1..0871b9d7ee025d70b42d4aaa1a50160a54c8c434 100644 (file)
@@ -44,8 +44,7 @@ namespace ceph {
     typedef std::list<std::pair<cost_t, T> > ListPairs;
 
     static unsigned filter_list_pairs(ListPairs *l,
-                                     std::function<bool (T&&)> f,
-                                     std::list<T>* out = nullptr) {
+                                     std::function<bool (T&&)> f) {
       unsigned ret = 0;
       for (typename ListPairs::iterator i = l->end();
           i != l->begin();
@@ -55,7 +54,6 @@ namespace ceph {
        --next;
        if (f(std::move(next->second))) {
          ++ret;
-         if (out) out->push_back(std::move(next->second));
          l->erase(next);
        } else {
          i = next;