performance Prefer prefix ++/-- operators for non-primitive types.

Origin commit data
------------------
Branch: ni/coolstream
Commit: bb347b3a44
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-04-28 (Sat, 28 Apr 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2012-04-28 10:56:27 +02:00
parent 0ce6e40d80
commit 7ec8226ad2
41 changed files with 117 additions and 117 deletions

View File

@@ -56,7 +56,7 @@ bool write_file(const std::string filename, const std::list<std::string> line)
if (!out.is_open())
return false;
for (std::list<std::string>::const_iterator it = line.begin(); it != line.end(); it++)
for (std::list<std::string>::const_iterator it = line.begin(); it != line.end(); ++it)
out << (*it) << std::endl;
return true;
@@ -64,7 +64,7 @@ bool write_file(const std::string filename, const std::list<std::string> line)
std::list<std::string>::iterator add_attributes(const std::map<std::string, std::string> attribute, std::list<std::string> &line, std::list<std::string>::iterator here)
{
for (std::map<std::string, std::string>::const_iterator it = attribute.begin(); it != attribute.end(); it++)
for (std::map<std::string, std::string>::const_iterator it = attribute.begin(); it != attribute.end(); ++it)
{
std::ostringstream out;
out << '\t' << (it -> first) << ' ' << (it -> second);
@@ -112,7 +112,7 @@ bool write_interface(const std::string filename, const std::string name, const b
if (!(in >> s))
{
it++;
++it;
continue;
}
@@ -135,22 +135,22 @@ bool write_interface(const std::string filename, const std::string name, const b
}
}
if (advance)
it++;
++it;
}
else
it++;
++it;
continue;
}
if (!(in >> s))
{
it++;
++it;
continue;
}
if (s != std::string(name))
{
it++;
++it;
continue;
}
}
@@ -166,7 +166,7 @@ bool write_interface(const std::string filename, const std::string name, const b
line.insert(it, "auto " + name);
/* add attributes */
it++;
++it;
it = add_attributes(attribute, line, it);
/* remove current attributes */
@@ -176,13 +176,13 @@ bool write_interface(const std::string filename, const std::string name, const b
if (!(in >> s)) /* retain empty lines */
{
it++;
++it;
continue;
}
if (s[0] == '#') /* retain comments */
{
it++;
++it;
continue;
}
@@ -328,7 +328,7 @@ bool getInetAttributes(const std::string name, bool &automatic_start, std::strin
broadcast = "";
gateway = "";
for (std::map<std::string, std::string>::const_iterator it = attribute.begin(); it != attribute.end(); it++)
for (std::map<std::string, std::string>::const_iterator it = attribute.begin(); it != attribute.end(); ++it)
{
if ((*it).first == "address")
address = (*it).second;