From 6e133a6cd9c3f63917cf87fab534c5d14722c3fa Mon Sep 17 00:00:00 2001 From: ulfjorensen Date: Tue, 18 May 2010 12:20:09 +0000 Subject: [PATCH] - Fixed compilation for some targets - Removed BOOST_FOREACH usage in ColladaParser::ReadPrimitives() because they seem to cause problems in NOBOOST builds git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@726 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/ColladaParser.cpp | 16 +++++++++------- include/aiMesh.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/code/ColladaParser.cpp b/code/ColladaParser.cpp index 9d67b6bbe..2dfdc94a8 100644 --- a/code/ColladaParser.cpp +++ b/code/ColladaParser.cpp @@ -1976,8 +1976,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector& pPer ThrowException( "Expected different index count in

element."); // find the data for all sources - BOOST_FOREACH( InputChannel& input, pMesh->mPerVertexData) + for( std::vector::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it) { + InputChannel& input = *it; if( input.mResolved) continue; @@ -1989,8 +1990,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector& pPer acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource); } // and the same for the per-index channels - BOOST_FOREACH( InputChannel& input, pPerIndexChannels) - { + for( std::vector::iterator it = pPerIndexChannels.begin(); it != pPerIndexChannels.end(); ++it) + { + InputChannel& input = *it; if( input.mResolved) continue; @@ -2061,11 +2063,11 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector& pPer vindex[offsets] = *idx++; // extract per-vertex channels using the global per-vertex offset - BOOST_FOREACH( const InputChannel& input, pMesh->mPerVertexData) - ExtractDataObjectFromChannel( input, vindex[perVertexOffset], pMesh); + for( std::vector::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it) + ExtractDataObjectFromChannel( *it, vindex[perVertexOffset], pMesh); // and extract per-index channels using there specified offset - BOOST_FOREACH( const InputChannel& input, pPerIndexChannels) - ExtractDataObjectFromChannel( input, vindex[input.mOffset], pMesh); + for( std::vector::iterator it = pPerIndexChannels.begin(); it != pPerIndexChannels.end(); ++it) + ExtractDataObjectFromChannel( *it, vindex[it->mOffset], pMesh); // store the vertex-data index for later assignment of bone vertex weights pMesh->mFacePosIndices.push_back( vindex[perVertexOffset]); diff --git a/include/aiMesh.h b/include/aiMesh.h index b15ddb7fd..fb87611d3 100644 --- a/include/aiMesh.h +++ b/include/aiMesh.h @@ -555,7 +555,7 @@ struct aiMesh * partitioning. * - Vertex animations refer to meshes by their names. **/ - aiString mName; + C_STRUCT aiString mName; /** The number of attachment meshes */ unsigned int mNumAnimMeshes;