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

Origin commit data
------------------
Commit: bb347b3a44
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-04-28 (Sat, 28 Apr 2012)
This commit is contained in:
Jacek Jendrzej
2012-04-28 10:56:27 +02:00
parent c179cc8762
commit 04be37cf14
41 changed files with 117 additions and 117 deletions

View File

@@ -95,7 +95,7 @@ bool CConfigFile::saveConfig(const char * const filename)
if (configFile != NULL)
{
for (ConfigDataMap::const_iterator it = configData.begin(); it != configData.end(); it++)
for (ConfigDataMap::const_iterator it = configData.begin(); it != configData.end(); ++it)
{
configFile << it->first << "=" << it->second << std::endl;
}
@@ -394,7 +394,7 @@ void CConfigFile::setInt32Vector(const std::string & key, const std::vector<int3
if (it == vec.end())
break;
s << (*it);
it++;
++it;
if (it == vec.end())
break;
s << delimiter;
@@ -411,7 +411,7 @@ void CConfigFile::setStringVector(const std::string & key, const std::vector<std
if (it == vec.end())
break;
configData[key] += *it;
it++;
++it;
if (it == vec.end())
break;
configData[key] += delimiter;

View File

@@ -64,7 +64,7 @@ void CEventServer::sendEvent(const unsigned int eventID, const initiators initia
{
eventClientMap notifyClients = eventData[eventID];
for(eventClientMap::iterator pos = notifyClients.begin(); pos != notifyClients.end(); pos++)
for(eventClientMap::iterator pos = notifyClients.begin(); pos != notifyClients.end(); ++pos)
{
//allen clients ein event schicken
eventClient client = pos->second;

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;

View File

@@ -445,7 +445,7 @@ std::list<UPnPAttribute> CUPnPDevice::SendSOAP(std::string servicename, std::str
std::list<CUPnPService>::iterator i;
std::list<UPnPAttribute> empty;
for (i=services.begin(); i != services.end(); i++)
for (i=services.begin(); i != services.end(); ++i)
{
if (i->servicename == servicename)
return i->SendSOAP(action, attribs);
@@ -458,7 +458,7 @@ std::list<std::string> CUPnPDevice::GetServices(void)
std::list<CUPnPService>::iterator i;
std::list<std::string> result;
for (i=services.begin(); i != services.end(); i++)
for (i=services.begin(); i != services.end(); ++i)
result.push_back(i->servicename);
return result;
}

View File

@@ -67,7 +67,7 @@ std::list<UPnPAttribute> CUPnPService::SendSOAP(std::string action, std::list<UP
post << "/>";
} else {
post << ">";
for (i = attribs.begin(); i != attribs.end(); i++)
for (i = attribs.begin(); i != attribs.end(); ++i)
{
if (i->second == "")
post << "<" << i->first << "/>";

View File

@@ -140,7 +140,7 @@ std::vector<CUPnPDevice> CUPnPSocket::Discover(std::string service)
if (line.substr(0,7) == "http://")
{
std::vector<CUPnPDevice>::iterator i;
for (i=devices.begin(); i != devices.end(); i++)
for (i=devices.begin(); i != devices.end(); ++i)
if (line == i->descurl)
goto found;
try

View File

@@ -357,7 +357,7 @@ CTimerd::TimerList CTimerdClient::getOverlappingTimers(time_t& startTime, time_t
getRecordingSafety(timerPre,timerPost);
for (CTimerd::TimerList::iterator it = timerlist.begin();
it != timerlist.end();it++)
it != timerlist.end();++it)
{
if(it->stopTime != 0 && stopTime != 0)
{