]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
bloom-filter: Remove POD overloads for insert and contains
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 27 Sep 2019 17:38:33 +0000 (19:38 +0200)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Fri, 27 Sep 2019 17:39:51 +0000 (19:39 +0200)
These are not used in Ceph code currently, and should not
be used in the future either, since any use will introduce
byte-order dependent behavior.  Remove them to prevent
accidental use.

Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
src/common/bloom_filter.hpp

index 3cd9d4151ee29db180715905c8b4ccc758131274..e468275a7b6baa0b4243ac565a683bf7d6db7ff4 100644 (file)
@@ -180,13 +180,6 @@ public:
     ++insert_count_;
   }
 
-  template<typename T>
-  inline void insert(const T& t)
-  {
-    // Note: T must be a C++ POD type.
-    insert(reinterpret_cast<const unsigned char*>(&t),sizeof(T));
-  }
-
   inline void insert(const std::string& key)
   {
     insert(reinterpret_cast<const unsigned char*>(key.c_str()),key.size());
@@ -251,12 +244,6 @@ public:
     return true;
   }
 
-  template<typename T>
-  inline bool contains(const T& t) const
-  {
-    return contains(reinterpret_cast<const unsigned char*>(&t),static_cast<std::size_t>(sizeof(T)));
-  }
-
   inline bool contains(const std::string& key) const
   {
     return contains(reinterpret_cast<const unsigned char*>(key.c_str()),key.size());