From 3932f084f7a8b1ac7ca1d3d7d81c32fc8e5057a7 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Tue, 14 Dec 2010 01:53:37 -0800 Subject: [PATCH] osd: PG::prior_set_affected: const cleanup Signed-off-by: Colin McCabe --- src/osd/PG.cc | 6 +++--- src/osd/PG.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 22a095476595b..3f4fad4b537c3 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -913,7 +913,7 @@ void PG::trim_past_intervals() // true if the given map affects the prior set -bool PG::prior_set_affected(OSDMap *osdmap) +bool PG::prior_set_affected(const OSDMap *osdmap) const { for (set::iterator p = prior_set.begin(); p != prior_set.end(); @@ -960,9 +960,9 @@ bool PG::prior_set_affected(OSDMap *osdmap) } // did a significant osd's up_thru change? - for (map::iterator p = prior_set_up_thru.begin(); + for (map::const_iterator p = prior_set_up_thru.begin(); p != prior_set_up_thru.end(); - p++) + ++p) if (p->second != osdmap->get_up_thru(p->first)) { dout(10) << "prior_set_affected: primary osd" << p->first << " up_thru " << p->second diff --git a/src/osd/PG.h b/src/osd/PG.h index 502aec4353ff7..e8bda5f6ffb8b 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -804,7 +804,7 @@ public: void trim_past_intervals(); void build_prior(); void clear_prior(); - bool prior_set_affected(OSDMap *map); + bool prior_set_affected(const OSDMap *map) const; bool all_unfound_are_lost(const OSDMap* osdmap) const; -- 2.39.5