mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-26 15:02:50 +02:00
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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user