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

@@ -225,7 +225,7 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
delete[] nd->mChildren;
if (child_nodes.size())
if (!child_nodes.empty())
nd->mChildren = new aiNode*[child_nodes.size()];
else nd->mChildren = NULL;
}
@@ -335,7 +335,7 @@ void OptimizeGraphProcess::Execute( aiScene* pScene)
if ( nodes_in != nodes_out) {
char buf[512];
sprintf(buf,"OptimizeGraphProcess finished; Input nodes: %i, Output nodes: %i",nodes_in,nodes_out);
sprintf(buf,"OptimizeGraphProcess finished; Input nodes: %u, Output nodes: %u",nodes_in,nodes_out);
DefaultLogger::get()->info(buf);
}
else DefaultLogger::get()->debug("OptimizeGraphProcess finished");