From: Michal Jarzabek Date: Mon, 11 Jul 2016 22:18:21 +0000 (+0100) Subject: osd/Watch: add consts to member functions X-Git-Tag: ses5-milestone5~315^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6873670377c46b0e73cff4a429694d9247dfbd25;p=ceph.git osd/Watch: add consts to member functions Signed-off-by: Michal Jarzabek --- diff --git a/src/osd/Watch.cc b/src/osd/Watch.cc index 43846c03a16a..4c6498e76a31 100644 --- a/src/osd/Watch.cc +++ b/src/osd/Watch.cc @@ -422,7 +422,7 @@ void Watch::discard_state() obc = ObjectContextRef(); } -bool Watch::is_discarded() +bool Watch::is_discarded() const { return discarded; } diff --git a/src/osd/Watch.h b/src/osd/Watch.h index 79b58e0dc9e1..86d12f21b83b 100644 --- a/src/osd/Watch.h +++ b/src/osd/Watch.h @@ -197,10 +197,10 @@ public: return last_ping; } - bool is_connected() { + bool is_connected() const { return conn.get() != NULL; } - bool is_connected(Connection *con) { + bool is_connected(Connection *con) const { return conn.get() == con; } @@ -248,7 +248,7 @@ public: void discard(); /// True if removed or discarded - bool is_discarded(); + bool is_discarded() const; /// Called on unwatch void remove(bool send_disconnect);