Fixing cppcheck "Prefer prefix ++/-- operators for non-primitive types." issues.

This commit is contained in:
lotodore
2011-02-09 14:33:39 +00:00
parent 07a4403e97
commit 4032bf48a2
24 changed files with 173 additions and 173 deletions
+6 -6
View File
@@ -278,7 +278,7 @@ void CleanerConfig::writeBuffer() const {
tmpElement->SetAttribute("type", "list");
list<string> tempList = configBufferList[i].defaultListValue;
list<string>::iterator it;
for(it = tempList.begin(); it != tempList.end(); it++) {
for(it = tempList.begin(); it != tempList.end(); ++it) {
TiXmlElement *tmpSubElement = new TiXmlElement(configBufferList[i].defaultValue);
tmpElement->LinkEndChild( tmpSubElement );
@@ -319,7 +319,7 @@ void CleanerConfig::updateConfig(ConfigState myConfigState) {
tmpElement->SetAttribute("type", "list");
list<string> tempList = configList[i].defaultListValue;
list<string>::iterator it;
for(it = tempList.begin(); it != tempList.end(); it++) {
for(it = tempList.begin(); it != tempList.end(); ++it) {
TiXmlElement *tmpSubElement = new TiXmlElement(configList[i].defaultValue);
tmpElement->LinkEndChild( tmpSubElement );
@@ -397,7 +397,7 @@ void CleanerConfig::updateConfig(ConfigState myConfigState) {
tmpElement->SetAttribute("type", "list");
list<string> tempList = tempStringList2;
list<string>::iterator it;
for(it = tempList.begin(); it != tempList.end(); it++) {
for(it = tempList.begin(); it != tempList.end(); ++it) {
TiXmlElement *tmpSubElement = new TiXmlElement(tempString1);
tmpElement->LinkEndChild( tmpSubElement );
@@ -418,7 +418,7 @@ void CleanerConfig::updateConfig(ConfigState myConfigState) {
tmpElement->SetAttribute("type", "list");
list<string> tempList = configList[i].defaultListValue;
list<string>::iterator it;
for(it = tempList.begin(); it != tempList.end(); it++) {
for(it = tempList.begin(); it != tempList.end(); ++it) {
TiXmlElement *tmpSubElement = new TiXmlElement(configList[i].defaultValue);
tmpElement->LinkEndChild( tmpSubElement );
@@ -507,7 +507,7 @@ list<int> CleanerConfig::readConfigIntList(string varName) const
string tempString;
int tempInt;
list<string>::iterator it;
for(it = tempStringList.begin(); it != tempStringList.end(); it++) {
for(it = tempStringList.begin(); it != tempStringList.end(); ++it) {
isst.str(*it);
isst >> tempInt;
@@ -549,7 +549,7 @@ void CleanerConfig::writeConfigIntList(string varName, list<int> varCont)
if (configBufferList[i].name == varName) {
string tempString;
list<int>::iterator it;
for(it = varCont.begin(); it != varCont.end(); it++) {
for(it = varCont.begin(); it != varCont.end(); ++it) {
intToString << (*it);
stringList.push_back(intToString.str());
+3 -3
View File
@@ -172,7 +172,7 @@ void MessageFilter::refreshConfig() {
std::list<std::string> badWordsList = config->readConfigStringList("BadWordsList");
std::list<std::string>::iterator it1;
QStringList bwList;
for(it1= badWordsList.begin(); it1 != badWordsList.end(); it1++) {
for(it1= badWordsList.begin(); it1 != badWordsList.end(); ++it1) {
bwList << QString::fromUtf8(it1->c_str());
}
myBadWordCheck->setBadWords(bwList);
@@ -180,7 +180,7 @@ void MessageFilter::refreshConfig() {
std::list<std::string> urlStringsList = config->readConfigStringList("UrlStringsList");
std::list<std::string>::iterator it2;
QStringList urlList;
for(it2= urlStringsList.begin(); it2 != urlStringsList.end(); it2++) {
for(it2= urlStringsList.begin(); it2 != urlStringsList.end(); ++it2) {
urlList << QString::fromUtf8(it2->c_str());
}
myUrlCheck->setUrlStrings(urlList);
@@ -188,7 +188,7 @@ void MessageFilter::refreshConfig() {
std::list<std::string> urlExceptionStringsList = config->readConfigStringList("UrlExceptionStringsList");
std::list<std::string>::iterator it3;
QStringList urlExceptionList;
for(it3= urlExceptionStringsList.begin(); it3 != urlExceptionStringsList.end(); it3++) {
for(it3= urlExceptionStringsList.begin(); it3 != urlExceptionStringsList.end(); ++it3) {
urlExceptionList << QString::fromUtf8(it3->c_str());
}
myUrlCheck->setUrlExceptionStrings(urlExceptionList);