From: Danny Al-Gaaf Date: Thu, 14 Mar 2013 13:08:22 +0000 (+0100) Subject: crush/CrushWrapper.cc: prefer prefix ++operator for iterators X-Git-Tag: v0.60~74^2~34 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e2776a93e6f03805c711da69637dc598af3afa16;p=ceph.git crush/CrushWrapper.cc: prefer prefix ++operator for iterators Signed-off-by: Danny Al-Gaaf --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index b2735b31926d..f086a5656a4a 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -89,7 +89,7 @@ bool CrushWrapper::check_item_loc(CephContext *cct, int item, const map::const_iterator p = type_map.begin(); p != type_map.end(); p++) { + for (map::const_iterator p = type_map.begin(); p != type_map.end(); ++p) { // ignore device if (p->first == 0) continue; @@ -155,7 +155,7 @@ int CrushWrapper::get_full_location_ordered(int id, vector // read the type map and get the name of the type with the largest ID int high_type = 0; - for (map::iterator it = type_map.begin(); it != type_map.end(); it++){ + for (map::iterator it = type_map.begin(); it != type_map.end(); ++it){ if ( (*it).first > high_type ) high_type = (*it).first; } @@ -194,7 +194,7 @@ map CrushWrapper::get_parent_hierarchy(int id) // read the type map and get the name of the type with the largest ID int high_type = 0; - for (map::iterator it = type_map.begin(); it != type_map.end(); it++){ + for (map::iterator it = type_map.begin(); it != type_map.end(); ++it){ if ( (*it).first > high_type ) high_type = (*it).first; } @@ -251,7 +251,7 @@ int CrushWrapper::insert_item(CephContext *cct, int item, float weight, string n int cur = item; - for (map::iterator p = type_map.begin(); p != type_map.end(); p++) { + for (map::iterator p = type_map.begin(); p != type_map.end(); ++p) { // ignore device type if (p->first == 0) continue; @@ -496,7 +496,7 @@ void CrushWrapper::reweight(CephContext *cct) { set roots; find_roots(roots); - for (set::iterator p = roots.begin(); p != roots.end(); p++) { + for (set::iterator p = roots.begin(); p != roots.end(); ++p) { if (*p >= 0) continue; crush_bucket *b = get_bucket(*p);