]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
RGWObjManifest: prefer prefix ++/--operator for non-trivial iterator
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 17:32:16 +0000 (18:32 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 19 Feb 2014 17:32:16 +0000 (18:32 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_rados.cc

index 29392b9f999cf6ef51eca9a6f4376e0e4fb61e77..f2b1ac4a62c554b28e852afb4611a05ae801458e 100644 (file)
@@ -533,7 +533,7 @@ void RGWObjManifest::obj_iterator::update_explicit_pos()
   stripe_ofs = ofs;
 
   map<uint64_t, RGWObjManifestPart>::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 {