From 219f9fadc63e39e254015eb26b895b97c04e5f33 Mon Sep 17 00:00:00 2001 From: ulfjorensen Date: Fri, 4 Jun 2010 14:05:06 +0000 Subject: [PATCH] Bugfix: removed misuse of "static" attribute preventing multithreaded usage of the importer git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@750 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ColladaLoader.cpp | 2 +- code/ColladaParser.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/ColladaLoader.cpp b/code/ColladaLoader.cpp index c080f10f7..203d8b3be 100644 --- a/code/ColladaLoader.cpp +++ b/code/ColladaLoader.cpp @@ -1288,7 +1288,7 @@ const aiString& ColladaLoader::FindFilenameForEffectTexture( const ColladaParser "Collada: Unable to resolve effect texture entry \"%s\", ended up at ID \"%s\".") % pName % name)); } - static aiString result; + aiString result; // if this is an embedded texture image setup an aiTexture for it if (imIt->second.mFileName.empty()) diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 99c74ca62..d6aa67d57 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -157,7 +157,8 @@ void ColladaParser::ReadStructure() while( mReader->read()) { // beginning of elements - if( mReader->getNodeType() == irr::io::EXN_ELEMENT) { + if( mReader->getNodeType() == irr::io::EXN_ELEMENT) + { if( IsElement( "asset")) ReadAssetInfo(); else if( IsElement( "library_animations")) @@ -185,7 +186,8 @@ void ColladaParser::ReadStructure() else SkipElement(); } - else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) { + else if( mReader->getNodeType() == irr::io::EXN_ELEMENT_END) + { break; } } @@ -2072,9 +2074,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector& pPer // gather that number of vertices for( size_t b = 0; b < numPoints; b++) { - // read all indices for this vertex. Yes, in a hacky static array + // read all indices for this vertex. Yes, in a hacky local array assert( numOffsets < 20 && perVertexOffset < 20); - static size_t vindex[20]; + size_t vindex[20]; for( size_t offsets = 0; offsets < numOffsets; ++offsets) vindex[offsets] = *idx++;