Apply clangformat

pull/2818/head
RichardTea 2019-12-09 09:56:01 +00:00
parent d8575b2b55
commit 463573c771
1 changed files with 208 additions and 211 deletions

View File

@ -43,13 +43,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* @brief Implementation of the aiProcess_OptimizGraph step * @brief Implementation of the aiProcess_OptimizGraph step
*/ */
#ifndef ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS #ifndef ASSIMP_BUILD_NO_OPTIMIZEGRAPH_PROCESS
#include "OptimizeGraph.h" #include "OptimizeGraph.h"
#include "ProcessHelper.h" #include "ProcessHelper.h"
#include <assimp/SceneCombiner.h>
#include <assimp/Exceptional.h> #include <assimp/Exceptional.h>
#include <assimp/SceneCombiner.h>
#include <stdio.h> #include <stdio.h>
using namespace Assimp; using namespace Assimp;
@ -70,11 +69,11 @@ using namespace Assimp;
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer // Constructor to be privately used by Importer
OptimizeGraphProcess::OptimizeGraphProcess() OptimizeGraphProcess::OptimizeGraphProcess() :
: mScene() mScene(),
, nodes_in() nodes_in(),
, nodes_out() nodes_out(),
, count_merged() { count_merged() {
// empty // empty
} }
@ -220,8 +219,8 @@ void OptimizeGraphProcess::CollectNewChildren(aiNode* nd, std::list<aiNode*>& no
if (!child_nodes.empty()) { if (!child_nodes.empty()) {
nd->mChildren = new aiNode *[child_nodes.size()]; nd->mChildren = new aiNode *[child_nodes.size()];
} } else
else nd->mChildren = nullptr; nd->mChildren = nullptr;
} }
nd->mNumChildren = static_cast<unsigned int>(child_nodes.size()); nd->mNumChildren = static_cast<unsigned int>(child_nodes.size());
@ -314,8 +313,7 @@ void OptimizeGraphProcess::Execute( aiScene* pScene) {
// Keep the dummy node but assign the name of the old root node to it // Keep the dummy node but assign the name of the old root node to it
pScene->mRootNode->mName = prev; pScene->mRootNode->mName = prev;
} } else {
else {
// Remove the dummy root node again. // Remove the dummy root node again.
pScene->mRootNode = dummy_root->mChildren[0]; pScene->mRootNode = dummy_root->mChildren[0];
@ -338,8 +336,7 @@ void OptimizeGraphProcess::Execute( aiScene* pScene) {
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// Build a LUT of all instanced meshes // Build a LUT of all instanced meshes
void OptimizeGraphProcess::FindInstancedMeshes (aiNode* pNode) void OptimizeGraphProcess::FindInstancedMeshes(aiNode *pNode) {
{
for (unsigned int i = 0; i < pNode->mNumMeshes; ++i) { for (unsigned int i = 0; i < pNode->mNumMeshes; ++i) {
++meshes[pNode->mMeshes[i]]; ++meshes[pNode->mMeshes[i]];
} }