From: Danny Al-Gaaf Date: Wed, 19 Feb 2014 17:32:16 +0000 (+0100) Subject: RGWObjManifest: prefer prefix ++/--operator for non-trivial iterator X-Git-Tag: v0.78~138^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e6772c768eb94d36f8ba97b968c2f0f6cd9c784d;p=ceph.git RGWObjManifest: prefer prefix ++/--operator for non-trivial iterator Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 29392b9f999c..f2b1ac4a62c5 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -533,7 +533,7 @@ void RGWObjManifest::obj_iterator::update_explicit_pos() stripe_ofs = ofs; map::iterator next_iter = explicit_iter; - next_iter++; + ++next_iter; if (next_iter != manifest->objs.end()) { stripe_size = next_iter->first - ofs; } else { @@ -547,7 +547,7 @@ void RGWObjManifest::obj_iterator::seek(uint64_t o) if (manifest->explicit_objs) { explicit_iter = manifest->objs.upper_bound(ofs); if (explicit_iter != manifest->objs.begin()) { - explicit_iter--; + --explicit_iter; } if (ofs >= manifest->obj_size) { ofs = manifest->obj_size; @@ -569,7 +569,7 @@ void RGWObjManifest::obj_iterator::seek(uint64_t o) rule_iter = manifest->rules.upper_bound(ofs); next_rule_iter = rule_iter; if (rule_iter != manifest->rules.begin()) { - rule_iter--; + --rule_iter; } RGWObjManifestRule& rule = rule_iter->second; @@ -624,7 +624,7 @@ void RGWObjManifest::obj_iterator::update_location() void RGWObjManifest::obj_iterator::operator++() { if (manifest->explicit_objs) { - explicit_iter++; + ++explicit_iter; if (explicit_iter == manifest->objs.end()) { ofs = manifest->obj_size; @@ -685,7 +685,7 @@ void RGWObjManifest::obj_iterator::operator++() rule_iter = next_rule_iter; bool last_rule = (next_rule_iter == manifest->rules.end()); if (!last_rule) { - next_rule_iter++; + ++next_rule_iter; } cur_part_id = rule_iter->second.start_part_num; } else {