CodeQuality improvements

Several small code improvements based on a cppcheck result
This commit is contained in:
rob100
2015-06-05 09:52:06 +02:00
parent 36a9f2be1a
commit b8c12fdc6f
25 changed files with 49 additions and 44 deletions

View File

@@ -791,7 +791,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Adjust all texture paths in the shader
const char* header_name = pcHeader->NAME;
if (shaders.blocks.size()) {
if (!shaders.blocks.empty()) {
for (std::list< Q3Shader::ShaderDataBlock >::iterator dit = shaders.blocks.begin(); dit != shaders.blocks.end(); ++dit) {
ConvertPath((*dit).name.c_str(),header_name,(*dit).name);
@@ -881,7 +881,7 @@ void MD3Importer::InternReadFile( const std::string& pFile,
// Now search the current shader for a record with this name (
// excluding texture file extension)
if (shaders.blocks.size()) {
if (!shaders.blocks.empty()) {
std::string::size_type s = convertedPath.find_last_of('.');
if (s == std::string::npos)