From: Sage Weil Date: Mon, 20 Feb 2017 19:17:36 +0000 (-0500) Subject: osd: constify handle_pg_create X-Git-Tag: v12.0.1~279^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8435311cb0edce8a101f900d302fe4ece690eb60;p=ceph.git osd: constify handle_pg_create Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 736bc48e15ba..e660fb7da864 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7788,7 +7788,7 @@ void OSD::split_pgs( */ void OSD::handle_pg_create(OpRequestRef op) { - MOSDPGCreate *m = (MOSDPGCreate*)op->get_req(); + const MOSDPGCreate *m = static_cast(op->get_req()); assert(m->get_type() == MSG_OSD_PG_CREATE); dout(10) << "handle_pg_create " << *m << dendl; @@ -7802,8 +7802,8 @@ void OSD::handle_pg_create(OpRequestRef op) op->mark_started(); - map::iterator ci = m->ctimes.begin(); - for (map::iterator p = m->mkpg.begin(); + map::const_iterator ci = m->ctimes.begin(); + for (map::const_iterator p = m->mkpg.begin(); p != m->mkpg.end(); ++p, ++ci) { assert(ci != m->ctimes.end() && ci->first == p->first);