]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
MonCommand: add operator== and operator!=
authorGreg Farnum <greg@inktank.com>
Sat, 7 Dec 2013 02:19:32 +0000 (18:19 -0800)
committerGreg Farnum <greg@inktank.com>
Mon, 9 Dec 2013 06:21:41 +0000 (22:21 -0800)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/mon/Monitor.h

index 5d280cc8a80fbd963d94d0f0cb3666b2b98db5fb..679ae39450b8800e36bbdc8dcc10d98c05b36ab2 100644 (file)
@@ -877,6 +877,14 @@ struct MonCommand {
     ::decode(req_perms, bl);
     ::decode(availability, bl);
   }
+  bool operator==(const MonCommand& o) const {
+    return cmdstring == o.cmdstring && helpstring == o.helpstring &&
+       module == o.module && req_perms == o.req_perms &&
+       availability == o.availability;
+  }
+  bool operator!=(const MonCommand& o) const {
+    return !(*this == o);
+  }
 
   static void encode_array(const MonCommand *cmds, int size, bufferlist &bl) {
     ENCODE_START(1, 1, bl);