mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 10:54:01 +02:00
- code cleanup based on verbose output from the latest git version of cppcheck
This commit is contained in:
@@ -328,7 +328,7 @@ GLint toCompressionFormatGl(GLint format) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::vector<int> supportedCompressionFormats = getSupportCompressedTextureFormats();
|
static std::vector<int> supportedCompressionFormats = getSupportCompressedTextureFormats();
|
||||||
if(supportedCompressionFormats.size() <= 0) {
|
if(supportedCompressionFormats.empty() == true) {
|
||||||
return format;
|
return format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -884,7 +884,7 @@ void clearFolderTreeContentsCheckSum(const string &path, const string filterFile
|
|||||||
}
|
}
|
||||||
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
|
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
|
||||||
if(fileExists(crcCacheFile) == true) {
|
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);
|
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);
|
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
|
||||||
if(fileExists(crcCacheFile) == true) {
|
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);
|
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);
|
string crcCacheFile = getFormattedCRCCacheFileName(cacheKeys);
|
||||||
if(fileExists(crcCacheFile) == true) {
|
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);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -253,8 +253,7 @@ void FileCRCPreCacheThread::execute() {
|
|||||||
if(results.empty() == true) {
|
if(results.empty() == true) {
|
||||||
for(unsigned int factionIdx = 0; factionIdx < results.size(); ++factionIdx) {
|
for(unsigned int factionIdx = 0; factionIdx < results.size(); ++factionIdx) {
|
||||||
string factionName = results[factionIdx];
|
string factionName = results[factionIdx];
|
||||||
int32 factionCRC = 0;
|
int32 factionCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, "/" + techName + "/factions/" + factionName + "/*", ".xml", NULL, true);
|
||||||
factionCRC = getFolderTreeContentsCheckSumRecursively(techDataPaths, "/" + techName + "/factions/" + factionName + "/*", ".xml", NULL, true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -51,7 +51,7 @@ P5 = 4.1381369442e-08f; /* 0x3331bb4c */
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
float y,hi,lo,c,t;
|
float y,hi,lo,c,t;
|
||||||
int32_t k,xsb;
|
int32_t k=0,xsb;
|
||||||
u_int32_t hx;
|
u_int32_t hx;
|
||||||
|
|
||||||
GET_FLOAT_WORD(hx,x);
|
GET_FLOAT_WORD(hx,x);
|
||||||
|
@@ -289,9 +289,9 @@ static Simple pS2[5] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
const Simple *p,*q;
|
const Simple *p=0,*q=0;
|
||||||
#else
|
#else
|
||||||
Simple *p,*q;
|
Simple *p=0,*q=0;
|
||||||
#endif
|
#endif
|
||||||
Simple z,r,s;
|
Simple z,r,s;
|
||||||
int32_t ix;
|
int32_t ix;
|
||||||
@@ -425,9 +425,9 @@ static Simple qS2[6] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
const Simple *p,*q;
|
const Simple *p=0,*q=0;
|
||||||
#else
|
#else
|
||||||
Simple *p,*q;
|
Simple *p=0,*q=0;
|
||||||
#endif
|
#endif
|
||||||
Simple s,r,z;
|
Simple s,r,z;
|
||||||
int32_t ix;
|
int32_t ix;
|
||||||
|
@@ -288,9 +288,9 @@ static Simple ps2[5] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
const Simple *p,*q;
|
const Simple *p=0,*q=0;
|
||||||
#else
|
#else
|
||||||
Simple *p,*q;
|
Simple *p=0,*q=0;
|
||||||
#endif
|
#endif
|
||||||
Simple z,r,s;
|
Simple z,r,s;
|
||||||
int32_t ix;
|
int32_t ix;
|
||||||
@@ -425,9 +425,9 @@ static Simple qs2[6] = {
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
const Simple *p,*q;
|
const Simple *p=0,*q=0;
|
||||||
#else
|
#else
|
||||||
Simple *p,*q;
|
Simple *p=0,*q=0;
|
||||||
#endif
|
#endif
|
||||||
Simple s,r,z;
|
Simple s,r,z;
|
||||||
int32_t ix;
|
int32_t ix;
|
||||||
|
Reference in New Issue
Block a user