- code cleanup based on verbose output from the latest git version of cppcheck

This commit is contained in:
Mark Vejvoda
2012-10-06 07:27:32 +00:00
parent 5e42c6dc03
commit 2f1ddf7776
6 changed files with 14 additions and 15 deletions

View File

@@ -884,7 +884,7 @@ void clearFolderTreeContentsCheckSum(const string &path, const string filterFile
}
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
if(fileExists(crcCacheFile) == true) {
bool result = removeFile(crcCacheFile.c_str());
bool result = removeFile(crcCacheFile);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileitem [%s] result = %d\n",__FILE__,__FUNCTION__,__LINE__,crcCacheFile.c_str(),result);
}
}
@@ -1058,7 +1058,7 @@ void clearFolderTreeContentsCheckSumList(vector<string> paths, string pathSearch
}
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
if(fileExists(crcCacheFile) == true) {
bool result = removeFile(crcCacheFile.c_str());
bool result = removeFile(crcCacheFile);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileitem [%s] result = %d\n",__FILE__,__FUNCTION__,__LINE__,crcCacheFile.c_str(),result);
}
}
@@ -1231,7 +1231,7 @@ void clearFolderTreeContentsCheckSumList(const string &path, const string filter
}
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
if(fileExists(crcCacheFile) == true) {
bool result = removeFile(crcCacheFile.c_str());
bool result = removeFile(crcCacheFile);
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] fileitem [%s] result = %d\n",__FILE__,__FUNCTION__,__LINE__,crcCacheFile.c_str(),result);
}
}

View File

@@ -253,8 +253,7 @@ void FileCRCPreCacheThread::execute() {
if(results.empty() == true) {
for(unsigned int factionIdx = 0; factionIdx < results.size(); ++factionIdx) {
string factionName = results[factionIdx];
int32 factionCRC = 0;
factionCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, "/" + techName + "/factions/" + factionName + "/*", ".xml", NULL, true);
int32 factionCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, "/" + techName + "/factions/" + factionName + "/*", ".xml", NULL, true);
}
}