]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
auth: EntityName ==, != operators
authorSage Weil <sage@inktank.com>
Mon, 14 May 2012 21:41:45 +0000 (14:41 -0700)
committerSage Weil <sage@inktank.com>
Wed, 16 May 2012 23:36:52 +0000 (16:36 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
src/common/entity_name.h

index 534b3afd33d54bb29435c3056f0a709e69a16984..07ac730e3bf2f91f8f2ee8120b16c57f2e921dee 100644 (file)
@@ -65,6 +65,8 @@ struct EntityName
 
   friend bool operator<(const EntityName& a, const EntityName& b);
   friend std::ostream& operator<<(std::ostream& out, const EntityName& n);
+  friend bool operator==(const EntityName& a, const EntityName& b);
+  friend bool operator!=(const EntityName& a, const EntityName& b);
 
 private:
   uint32_t type;
@@ -76,4 +78,6 @@ uint32_t str_to_ceph_entity_type(const char * str);
 
 WRITE_CLASS_ENCODER(EntityName);
 
+WRITE_EQ_OPERATORS_2(EntityName, type, id)
+
 #endif