- add missing initialization of several class members
- prefer check for empty() over check for size() in OptimizeGraph (empty() is guaranteed to be constant time, size() is not) - fix a couple of incorrect indentations
This commit is contained in:
@@ -71,6 +71,10 @@ using namespace Assimp;
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Constructor to be privately used by Importer
|
||||
OptimizeGraphProcess::OptimizeGraphProcess()
|
||||
: mScene()
|
||||
, nodes_in()
|
||||
, nodes_out()
|
||||
, count_merged()
|
||||
{}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
@@ -122,7 +126,7 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
|
||||
++it;
|
||||
}
|
||||
|
||||
if (nd->mNumMeshes || child_nodes.size()) {
|
||||
if (nd->mNumMeshes || !child_nodes.empty()) {
|
||||
nodes.push_back(nd);
|
||||
}
|
||||
else {
|
||||
@@ -172,7 +176,7 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
|
||||
}
|
||||
++it;
|
||||
}
|
||||
if (join_master && join.size()) {
|
||||
if (join_master && !join.empty()) {
|
||||
join_master->mName.length = sprintf(join_master->mName.data,"$MergedNode_%i",count_merged++);
|
||||
|
||||
unsigned int out_meshes = 0;
|
||||
|
||||
Reference in New Issue
Block a user