From e6772c768eb94d36f8ba97b968c2f0f6cd9c784d Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 19 Feb 2014 18:32:16 +0100 Subject: [PATCH] RGWObjManifest: prefer prefix ++/--operator for non-trivial iterator Signed-off-by: Danny Al-Gaaf --- src/rgw/rgw_rados.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 29392b9f999cf..f2b1ac4a62c55 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 { -- 2.39.5