From: Greg Farnum Date: Sat, 7 Dec 2013 02:19:32 +0000 (-0800) Subject: MonCommand: add operator== and operator!= X-Git-Tag: v0.75~125^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dca5383f2e040c90ec72b24997f55e1c5cc65827;p=ceph.git MonCommand: add operator== and operator!= Signed-off-by: Greg Farnum --- diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index 5d280cc8a80f..679ae39450b8 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -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);