From f23285a1cecee28c73bcaf685040fec7f6138451 Mon Sep 17 00:00:00 2001 From: rmitton Date: Mon, 25 Jan 2016 13:45:08 -0800 Subject: [PATCH] Fixed whitespace to match coding standard. --- code/SIBImporter.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/code/SIBImporter.cpp b/code/SIBImporter.cpp index a25b96698..8fce2234e 100644 --- a/code/SIBImporter.cpp +++ b/code/SIBImporter.cpp @@ -512,7 +512,7 @@ static void ReadShape(SIB* sib, StreamReaderLE* stream) aiString name; while (stream->GetRemainingSizeToLimit() >= sizeof(SIBChunk)) - { + { SIBChunk chunk = ReadChunk(stream); unsigned oldLimit = stream->SetReadLimit(stream->GetCurrentPos() + chunk.Size); @@ -720,7 +720,7 @@ static void ReadLight(SIB* sib, StreamReaderLE* stream) aiLight* light = new aiLight(); while (stream->GetRemainingSizeToLimit() >= sizeof(SIBChunk)) - { + { SIBChunk chunk = ReadChunk(stream); unsigned oldLimit = stream->SetReadLimit(stream->GetCurrentPos() + chunk.Size); @@ -768,18 +768,18 @@ static void ReadInstance(SIB* sib, StreamReaderLE* stream) uint32_t shapeIndex = 0; while (stream->GetRemainingSizeToLimit() >= sizeof(SIBChunk)) - { + { SIBChunk chunk = ReadChunk(stream); unsigned oldLimit = stream->SetReadLimit(stream->GetCurrentPos() + chunk.Size); switch (chunk.Tag) { - case TAG('D','I','N','F'): break; // display info, not needed - case TAG('P','I','N','F'): break; // ? + case TAG('D','I','N','F'): break; // display info, not needed + case TAG('P','I','N','F'): break; // ? case TAG('A','X','I','S'): ReadAxis(inst.axis, stream); break; - case TAG('I','N','S','I'): shapeIndex = stream->GetU4(); break; - case TAG('S','M','T','X'): ReadScale(inst.axis, stream); break; - case TAG('S','N','A','M'): inst.name = ReadString(stream, chunk.Size/2); break; + case TAG('I','N','S','I'): shapeIndex = stream->GetU4(); break; + case TAG('S','M','T','X'): ReadScale(inst.axis, stream); break; + case TAG('S','N','A','M'): inst.name = ReadString(stream, chunk.Size/2); break; default: UnknownChunk(stream, chunk); break; } @@ -808,7 +808,7 @@ static void ReadScene(SIB* sib, StreamReaderLE* stream) { // Parse each chunk in turn. while (stream->GetRemainingSizeToLimit() >= sizeof(SIBChunk)) - { + { SIBChunk chunk = ReadChunk(stream); unsigned oldLimit = stream->SetReadLimit(stream->GetCurrentPos() + chunk.Size); @@ -860,9 +860,9 @@ void SIBImporter::InternReadFile(const std::string& pFile, pScene->mNumMaterials = sib.mtls.size(); pScene->mNumMeshes = sib.meshes.size(); pScene->mNumLights = sib.lights.size(); - pScene->mMaterials = pScene->mNumMaterials ? new aiMaterial*[pScene->mNumMaterials] : NULL; - pScene->mMeshes = pScene->mNumMeshes ? new aiMesh*[pScene->mNumMeshes] : NULL; - pScene->mLights = pScene->mNumLights ? new aiLight*[pScene->mNumLights] : NULL; + pScene->mMaterials = pScene->mNumMaterials ? new aiMaterial*[pScene->mNumMaterials] : NULL; + pScene->mMeshes = pScene->mNumMeshes ? new aiMesh*[pScene->mNumMeshes] : NULL; + pScene->mLights = pScene->mNumLights ? new aiLight*[pScene->mNumLights] : NULL; if (pScene->mNumMaterials) memcpy(pScene->mMaterials, &sib.mtls[0], sizeof(aiMaterial*) * pScene->mNumMaterials); if (pScene->mNumMeshes) @@ -875,7 +875,7 @@ void SIBImporter::InternReadFile(const std::string& pFile, aiNode *root = new aiNode(); root->mName.Set(""); root->mNumChildren = sib.objs.size() + sib.lights.size(); - root->mChildren = root->mNumChildren ? new aiNode*[root->mNumChildren] : NULL; + root->mChildren = root->mNumChildren ? new aiNode*[root->mNumChildren] : NULL; pScene->mRootNode = root; // Add nodes for each object. @@ -889,7 +889,7 @@ void SIBImporter::InternReadFile(const std::string& pFile, node->mTransformation = obj.axis; node->mNumMeshes = obj.meshCount; - node->mMeshes = node->mNumMeshes ? new unsigned[node->mNumMeshes] : NULL; + node->mMeshes = node->mNumMeshes ? new unsigned[node->mNumMeshes] : NULL; for (unsigned i=0;imNumMeshes;i++) node->mMeshes[i] = obj.meshIdx + i;