From df91fa8db300b458302cdfc828eda0c9ffde7842 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 14 Mar 2021 11:56:06 +0800 Subject: [PATCH] osd: mark HeartbeatInfo::is_stale() and friends "const" just for more const correctness. Signed-off-by: Kefu Chai (cherry picked from commit 253cb8f4114e92768a54376a8834006479930b69) --- src/osd/OSD.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 90d2f800fb84..4348dcd64117 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1422,7 +1422,7 @@ private: std::vector hb_front_min; std::vector hb_front_max; - bool is_stale(utime_t stale) { + bool is_stale(utime_t stale) const { if (ping_history.empty()) { return false; } @@ -1430,7 +1430,7 @@ private: return oldest_deadline <= stale; } - bool is_unhealthy(utime_t now) { + bool is_unhealthy(utime_t now) const { if (ping_history.empty()) { /// we haven't sent a ping yet or we have got all replies, /// in either way we are safe and healthy for now @@ -1441,7 +1441,7 @@ private: return now > oldest_deadline; } - bool is_healthy(utime_t now) { + bool is_healthy(utime_t now) const { if (last_rx_front == utime_t() || last_rx_back == utime_t()) { // only declare to be healthy until we have received the first // replies from both front/back connections -- 2.47.3