From 7e2b15374c2b639942e75b05253f6dff1ff62697 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Fri, 27 Sep 2019 19:38:33 +0200 Subject: [PATCH] bloom-filter: Remove POD overloads for insert and contains 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 --- src/common/bloom_filter.hpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/common/bloom_filter.hpp b/src/common/bloom_filter.hpp index 3cd9d4151ee2..e468275a7b6b 100644 --- a/src/common/bloom_filter.hpp +++ b/src/common/bloom_filter.hpp @@ -180,13 +180,6 @@ public: ++insert_count_; } - template - inline void insert(const T& t) - { - // Note: T must be a C++ POD type. - insert(reinterpret_cast(&t),sizeof(T)); - } - inline void insert(const std::string& key) { insert(reinterpret_cast(key.c_str()),key.size()); @@ -251,12 +244,6 @@ public: return true; } - template - inline bool contains(const T& t) const - { - return contains(reinterpret_cast(&t),static_cast(sizeof(T))); - } - inline bool contains(const std::string& key) const { return contains(reinterpret_cast(key.c_str()),key.size()); -- 2.47.3