From 253cb8f4114e92768a54376a8834006479930b69 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 --- 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 bd127285a1551..aed0523a2eb87 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1420,7 +1420,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; } @@ -1428,7 +1428,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 @@ -1439,7 +1439,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.39.5