summaryrefslogtreecommitdiffstats
path: root/src/messages/MOSDMap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messages/MOSDMap.h')
-rw-r--r--src/messages/MOSDMap.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/messages/MOSDMap.h b/src/messages/MOSDMap.h
index 5ac17b6451e..cea74f12fc3 100644
--- a/src/messages/MOSDMap.h
+++ b/src/messages/MOSDMap.h
@@ -27,18 +27,18 @@ class MOSDMap : public Message {
map<epoch_t, bufferlist> incremental_maps;
epoch_t oldest_map, newest_map;
- epoch_t get_first() {
+ epoch_t get_first() const {
epoch_t e = 0;
- map<epoch_t, bufferlist>::iterator i = maps.begin();
+ map<epoch_t, bufferlist>::const_iterator i = maps.begin();
if (i != maps.end()) e = i->first;
i = incremental_maps.begin();
if (i != incremental_maps.end() &&
(e == 0 || i->first < e)) e = i->first;
return e;
}
- epoch_t get_last() {
+ epoch_t get_last() const {
epoch_t e = 0;
- map<epoch_t, bufferlist>::reverse_iterator i = maps.rbegin();
+ map<epoch_t, bufferlist>::const_reverse_iterator i = maps.rbegin();
if (i != maps.rend()) e = i->first;
i = incremental_maps.rbegin();
if (i != incremental_maps.rend() &&
@@ -123,8 +123,8 @@ public:
}
}
- const char *get_type_name() { return "omap"; }
- void print(ostream& out) {
+ const char *get_type_name() const { return "omap"; }
+ void print(ostream& out) const {
out << "osd_map(" << get_first() << ".." << get_last();
if (oldest_map || newest_map)
out << " src has " << oldest_map << ".." << newest_map;