Fixed over 500 compile warnings. Mostly:
* Unused variables. * Missing newlines at ends of #included files. * signed int loop variables where the termination condition is an unsigned 'get number of' function. * 'NULL' used inappropriately for an integer or character constant (NULL is a pointer) * abstract base classes with no virtual destructor. * Floating point constants used to initialise integer variables.
This commit is contained in:
@@ -47,7 +47,6 @@ void BspConverter::convertBsp(BspLoader& bspLoader,float scaling)
|
||||
{
|
||||
printf("Reading bspLeaf %i from total %i (%f procent)\n",i, bspLoader.m_numleafs,(100.f*(float)i/float(bspLoader.m_numleafs)) );
|
||||
|
||||
bool isValid = false;
|
||||
bool isValidBrush = false;
|
||||
|
||||
BSPLeaf& leaf = bspLoader.m_dleafs[i];
|
||||
@@ -96,11 +95,6 @@ void BspConverter::convertBsp(BspLoader& bspLoader,float scaling)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int i=0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,8 +199,6 @@ void BspConverter::convertBsp(BspLoader& bspLoader,float scaling)
|
||||
|
||||
void BspConverter::getVerticesFromPlaneEquations(const std::vector<SimdVector3>& planeEquations , std::vector<SimdVector3>& verticesOut )
|
||||
{
|
||||
float minimumDotProduct = 1e30f;
|
||||
|
||||
const int numbrushes = planeEquations.size();
|
||||
// brute force:
|
||||
for (int i=0;i<numbrushes;i++)
|
||||
@@ -279,4 +271,4 @@ bool BspConverter::isInside(const std::vector<SimdVector3>& planeEquations, cons
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,4 +37,5 @@ class BspConverter
|
||||
|
||||
};
|
||||
|
||||
#endif //BSP_CONVERTER_H
|
||||
#endif //BSP_CONVERTER_H
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ char* makeExeToBspFilename(const char* lpCmdLine)
|
||||
// displays the first filename
|
||||
const char *in = lpCmdLine;
|
||||
char* out = cleaned_filename;
|
||||
*out = NULL;
|
||||
*out = '\0';
|
||||
// If the first character is a ", skip it (filenames with spaces in them are quoted)
|
||||
if(*in == '\"')
|
||||
{
|
||||
@@ -276,7 +276,7 @@ char* makeExeToBspFilename(const char* lpCmdLine)
|
||||
break;
|
||||
|
||||
// If we hit a null or a quote, stop copying. This will get just the first filename.
|
||||
if(*in == NULL || *in == '\"')
|
||||
if(*in == '\0' || *in == '\"')
|
||||
break;
|
||||
// Copy while swapping backslashes for forward ones
|
||||
if(*in == '\\')
|
||||
|
||||
@@ -34,4 +34,6 @@ class BspDemo : public DemoApplication
|
||||
|
||||
};
|
||||
|
||||
#endif //BSP_DEMO_H
|
||||
#endif //BSP_DEMO_H
|
||||
|
||||
|
||||
|
||||
@@ -710,4 +710,5 @@ const BSPEntity * BspLoader::getEntityByValue( const char* name, const char* val
|
||||
}
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user