]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper.cc: prefer ++operator for non-primitive iterators
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 11 Nov 2014 14:50:52 +0000 (15:50 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 13 Nov 2014 22:39:08 +0000 (23:39 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/crush/CrushWrapper.cc

index 20a722a0941d73e1d86f8fc9a05f86a56a9f80e3..de49b302e2924c495bd7f1d6cae2daefada0e208 100644 (file)
@@ -722,7 +722,8 @@ int CrushWrapper::get_item_weight(int id) const
 
 int CrushWrapper::get_item_weight_in_loc(int id, const map<string,string> &loc)
 {
-  for (map<string,string>::const_iterator l = loc.begin(); l != loc.end(); l++) {
+  for (map<string,string>::const_iterator l = loc.begin(); l != loc.end(); ++l) {
+
     int bid = get_item_id(l->second);
     if (!bucket_exists(bid))
       continue;
@@ -765,7 +766,7 @@ int CrushWrapper::adjust_item_weight_in_loc(CephContext *cct, int id, int weight
   ldout(cct, 5) << "adjust_item_weight_in_loc " << id << " weight " << weight << " in " << loc << dendl;
   int changed = 0;
 
-  for (map<string,string>::const_iterator l = loc.begin(); l != loc.end(); l++) {
+  for (map<string,string>::const_iterator l = loc.begin(); l != loc.end(); ++l) {
     int bid = get_item_id(l->second);
     if (!bucket_exists(bid))
       continue;