From: Sage Weil Date: Wed, 22 Jul 2015 13:48:31 +0000 (-0400) Subject: common/hobject_t: remove comparison operators for [g]hobject_t X-Git-Tag: v9.1.0~346^2~43 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e23f04c6d50b766bf546b895bac8c720ec0d7fc;p=ceph.git common/hobject_t: remove comparison operators for [g]hobject_t *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 --- diff --git a/src/common/hobject.h b/src/common/hobject.h index ce9f1dd009e3..b5f8b363abce 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -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,