]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: drop the unused reset_comparator() from SharedLRU. 26224/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 12 Sep 2018 21:28:27 +0000 (23:28 +0200)
committerKefu Chai <kchai@redhat.com>
Thu, 31 Jan 2019 12:46:07 +0000 (20:46 +0800)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/common/shared_cache.hpp

index 20914d6349c8178a3013f60b0f061d23a011c889..b8623d9de09e36a2e94f34481e3678ebc3f9ecc6 100644 (file)
@@ -128,20 +128,6 @@ public:
     return size;
   }
 
-  /// adjust container comparator (for purposes of get_next sort order)
-  void reset_comparator(C comp) {
-    // get_next uses weak_refs; that's the only container we need to
-    // reorder.
-    map<K, pair<WeakVPtr, V*>, C> temp;
-
-    std::lock_guard locker{lock};
-    temp.swap(weak_refs);
-
-    // reconstruct with new comparator
-    weak_refs = map<K, pair<WeakVPtr, V*>, C>(comp);
-    weak_refs.insert(temp.begin(), temp.end());
-  }
-
   void set_cct(CephContext *c) {
     cct = c;
   }