Pārlūkot izejas kodu

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
ulfjorensen 15 gadi atpakaļ
vecāks
revīzija
219f9fadc6
2 mainītis faili ar 7 papildinājumiem un 5 dzēšanām
  1. 1 1
      code/ColladaLoader.cpp
  2. 6 4
      code/ColladaParser.cpp

+ 1 - 1
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()) 

+ 6 - 4
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<InputChannel>& 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++;