]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common,include: drop include/cmp.h 47427/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 3 Aug 2022 03:49:32 +0000 (11:49 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 4 Aug 2022 13:33:51 +0000 (21:33 +0800)
it is not used anymore. so just ditch it.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/common/hobject.h
src/include/cmp.h [deleted file]
src/include/object.h

index 83885163efe818b56e1b7f25f98d64a9805d065d..28f314d7935e426a9f04540816b83690eb4c3fa9 100644 (file)
@@ -16,7 +16,6 @@
 #define __CEPH_OS_HOBJECT_H
 
 #include "include/types.h"
-#include "include/cmp.h"
 
 #include "json_spirit/json_spirit_value.h"
 #include "include/ceph_assert.h"   // spirit clobbers it!
diff --git a/src/include/cmp.h b/src/include/cmp.h
deleted file mode 100644 (file)
index 9b39aaa..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef __CEPH_CMP_H
-#define __CEPH_CMP_H
-
-/*
- * macros to define comparison operators for classes with small numbers of members.
- */
-#define WRITE_EQ_OPERATORS_7(type, a, b, c, d, e, f, g)                        \
-  inline bool operator==(const type &l, const type &r) {               \
-    return l.a == r.a && l.b == r.b && l.c == r.c && l.d == r.d && l.e == r.e && l.f == r.f && l.g == r.g; \
-  }                                                                    \
-  inline bool operator!=(const type &l, const type &r) {               \
-    return l.a != r.a || l.b != r.b || l.c != r.c || l.d != r.d || l.e != r.e || l.f != r.f || l.g != r.g; \
-  }
-#define WRITE_CMP_OPERATORS_7(type, a, b, c, d, e, f, g)               \
-  inline bool operator<=(const type &l, const type &r) {               \
-    return l.a < r.a ||                                                        \
-      (l.a == r.a && (l.b < r.b ||                                     \
-                     (l.b == r.b && (l.c < r.c ||                      \
-                                     (l.c == r.c && (l.d < r.d ||      \
-                                                     (l.d == r.d && (l.e < r.e || \
-                                                                     (l.e == r.e && (l.f < r.f || \
-                                                                                     (l.f == r.f && l.g <= r.g))))))))))); \
-  }                                                                    \
-  inline bool operator>=(const type &l, const type &r) {               \
-    return l.a > r.a ||                                                        \
-      (l.a == r.a && (l.b > r.b ||                                     \
-                     (l.b == r.b && (l.c > r.c ||                      \
-                                     (l.c == r.c && (l.d > r.d ||      \
-                                                     (l.d == r.d && (l.e > r.e || \
-                                                                     (l.e == r.e && (l.f > r.f || \
-                                                                                     (l.f == r.f && l.g >= r.g))))))))))); \
-  }                                                                    \
-  inline bool operator>(const type &l, const type &r) {                        \
-    return l.a > r.a ||                                                        \
-      (l.a == r.a && (l.b > r.b ||                                     \
-                     (l.b == r.b && (l.c > r.c ||                      \
-                                     (l.c == r.c && (l.d > r.d ||      \
-                                                     (l.d == r.d && (l.e > r.e || \
-                                                                     (l.e == r.e && (l.f > r.f || \
-                                                                                     (l.f == r.f && l.g > r.g))))))))))); \
-  }                                                                    \
-  inline bool operator<(const type &l, const type &r) {                        \
-    return l.a < r.a ||                                                        \
-      (l.a == r.a && (l.b < r.b ||                                     \
-                     (l.b == r.b && (l.c < r.c ||                      \
-                                     (l.c == r.c && (l.d < r.d ||      \
-                                                     (l.d == r.d && (l.e < r.e || \
-                                                                     (l.e == r.e && (l.f < r.f || \
-                                                                                     (l.f == r.f && l.g < r.g))))))))))); \
-  }
-#endif
index 68d55938381d0dba79f072abf5e87874f7c59f27..4564af86e5770e543f3c24554f3fa039a95f8dd8 100644 (file)
@@ -29,7 +29,6 @@
 #include "hash.h"
 #include "encoding.h"
 #include "ceph_hash.h"
-#include "cmp.h"
 
 struct object_t {
   std::string name;