From eb1ee61420e61a3da4dada266ce2cfb39c2e1d68 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 18 Apr 2015 19:17:48 +0200 Subject: [PATCH] fix code reading findings: use of std::copy Signed-off-by: Kim Kulling --- code/OpenGEXImporter.cpp | 9 ++------- code/OpenGEXImporter.h | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index 7a4525833..b9496c465 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -44,8 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "MakeVerboseFormat.h" #include -#include "../include/assimp/scene.h" - +#include #include @@ -788,11 +787,7 @@ void OpenGEXImporter::copyMeshes( aiScene *pScene ) { } pScene->mNumMeshes = m_meshCache.size(); pScene->mMeshes = new aiMesh*[ pScene->mNumMeshes ]; - size_t i( 0 ); - for( std::vector::iterator it = m_meshCache.begin(); it != m_meshCache.end(); it++ ) { - pScene->mMeshes[ i ] = *it; - i++; - } + std::copy( m_meshCache.begin(), m_meshCache.end(), pScene->mMeshes ); } //------------------------------------------------------------------------------------------------ diff --git a/code/OpenGEXImporter.h b/code/OpenGEXImporter.h index c8236eaf3..ac72e8224 100644 --- a/code/OpenGEXImporter.h +++ b/code/OpenGEXImporter.h @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef ASSIMP_BUILD_NO_OPENGEX_IMPORTER #include "BaseImporter.h" -#include "../include/assimp/mesh.h" +#include #include #include