]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/hobject_t: remove comparison operators for [g]hobject_t
authorSage Weil <sage@redhat.com>
Wed, 22 Jul 2015 13:48:31 +0000 (09:48 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Aug 2015 14:16:02 +0000 (10:16 -0400)
*All* comparisions, including everything in the OSD, needs to
conditionally use either bitwise or nibblewise sort order.  Force the
issue by using the explicit cmp methods.

Signed-off-by: Sage Weil <sage@redhat.com>
src/common/hobject.h

index ce9f1dd009e35960c43a82fac9a4f968563775d7..b5f8b363abcef24fc9bfd7203bbbc49c1a21bf38 100644 (file)
@@ -289,18 +289,6 @@ CEPH_HASH_NAMESPACE_END
 ostream& operator<<(ostream& out, const hobject_t& o);
 
 WRITE_EQ_OPERATORS_7(hobject_t, hash, oid, get_key(), snap, pool, max, nspace)
-static inline bool operator<(const hobject_t& l, const hobject_t& r) {
-  return cmp_bitwise(l, r) < 0;
-}
-static inline bool operator<=(const hobject_t& l, const hobject_t& r) {
-  return cmp_bitwise(l, r) <= 0;
-}
-static inline bool operator>(const hobject_t& l, const hobject_t& r) {
-  return cmp_bitwise(l, r) > 0;
-}
-static inline bool operator>=(const hobject_t& l, const hobject_t& r) {
-  return cmp_bitwise(l, r) >= 0;
-}
 
 extern int cmp_nibblewise(const hobject_t& l, const hobject_t& r);
 extern int cmp_bitwise(const hobject_t& l, const hobject_t& r);
@@ -442,19 +430,6 @@ ostream& operator<<(ostream& out, const ghobject_t& o);
 
 WRITE_EQ_OPERATORS_4(ghobject_t, max, shard_id, hobj, generation)
 
-static inline bool operator<(const ghobject_t& l, const ghobject_t& r) {
-  return cmp_bitwise(l, r) < 0;
-}
-static inline bool operator<=(const ghobject_t& l, const ghobject_t& r) {
-  return cmp_bitwise(l, r) <= 0;
-}
-static inline bool operator>(const ghobject_t& l, const ghobject_t& r) {
-  return cmp_bitwise(l, r) > 0;
-}
-static inline bool operator>=(const ghobject_t& l, const ghobject_t& r) {
-  return cmp_bitwise(l, r) >= 0;
-}
-
 extern int cmp_nibblewise(const ghobject_t& l, const ghobject_t& r);
 extern int cmp_bitwise(const ghobject_t& l, const ghobject_t& r);
 static inline int cmp(const ghobject_t& l, const ghobject_t& r,