]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/cmdparse.cc: prefer prefix ++operator for non-trivial iterator
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 24 Jun 2013 11:50:33 +0000 (13:50 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 24 Jun 2013 11:50:33 +0000 (13:50 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/common/cmdparse.cc

index d4984d1d3325bd1594c839dd296d85e3413b1527..5cb512233477cad84fe9965d2b17de87d186a242 100644 (file)
@@ -70,7 +70,7 @@ dump_cmd_to_json(JSONFormatter *f, const string& cmd)
     f->open_object_section(desckv["name"].c_str());
     // dump all the keys including name into the array
     for (std::map<std::string, std::string>::iterator it = desckv.begin();
-        it != desckv.end(); it++) {
+        it != desckv.end(); ++it) {
       f->dump_string(it->first.c_str(), it->second);
     }
     f->close_section(); // attribute object for individual desc
@@ -106,7 +106,7 @@ cmdmap_from_json(vector<string> cmd, map<string, cmd_vartype> *mapp, stringstrea
   string fullcmd;
   // First, join all cmd strings
   for (vector<string>::iterator it = cmd.begin();
-       it != cmd.end(); it++)
+       it != cmd.end(); ++it)
     fullcmd += *it;
 
   try {
@@ -119,7 +119,7 @@ cmdmap_from_json(vector<string> cmd, map<string, cmd_vartype> *mapp, stringstrea
     // make sure all contents are simple types (not arrays or objects)
     json_spirit::mObject o = v.get_obj();
     for (map<string, json_spirit::mValue>::iterator it = o.begin();
-        it != o.end(); it++) {
+        it != o.end(); ++it) {
 
       // ok, marshal it into our string->cmd_vartype map, or throw an
       // exception if it's not a simple datatype.  This is kind of
@@ -140,7 +140,7 @@ cmdmap_from_json(vector<string> cmd, map<string, cmd_vartype> *mapp, stringstrea
          vector<json_spirit::mValue> spvals = it->second.get_array();
          vector<string> outv;
          for (vector<json_spirit::mValue>::iterator sv = spvals.begin();
-              sv != spvals.end(); sv++) {
+              sv != spvals.end(); ++sv) {
            if (sv->type() != json_spirit::str_type)
              throw(runtime_error("Can't handle arrays of non-strings"));
            outv.push_back(sv->get_str());