Merge pull request #10251 from stiopaa1/osd_watch_addConsts

osd/Watch: add consts to member functions

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-07-25 12:43:14 +08:00 committed by GitHub
commit a048e19589
2 changed files with 4 additions and 4 deletions

View File

@ -422,7 +422,7 @@ void Watch::discard_state()
obc = ObjectContextRef();
}
bool Watch::is_discarded()
bool Watch::is_discarded() const
{
return discarded;
}

View File

@ -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);