From dca5383f2e040c90ec72b24997f55e1c5cc65827 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Fri, 6 Dec 2013 18:19:32 -0800 Subject: [PATCH] MonCommand: add operator== and operator!= Signed-off-by: Greg Farnum --- src/mon/Monitor.h | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.47.3