From 8478b03f2204201ace0e6c4eb60f1e0a17194898 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 20 Nov 2016 12:27:04 +1100 Subject: [PATCH] Fixed build warnings on MSVC14 x64 in the NDO format sources. --- code/NDOLoader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/NDOLoader.cpp b/code/NDOLoader.cpp index f04eb53..219057c 100644 --- a/code/NDOLoader.cpp +++ b/code/NDOLoader.cpp @@ -257,7 +257,7 @@ void NDOImporter::InternReadFile( const std::string& pFile, } aiMesh* mesh = new aiMesh(); - aiFace* faces = mesh->mFaces = new aiFace[mesh->mNumFaces=face_table.size()]; + aiFace* faces = mesh->mFaces = new aiFace[mesh->mNumFaces=static_cast(face_table.size())]; vertices.clear(); vertices.reserve(4 * face_table.size()); // arbitrarily chosen @@ -278,7 +278,7 @@ void NDOImporter::InternReadFile( const std::string& pFile, next_edge = obj.edges[cur_edge].edge[4]; next_vert = obj.edges[cur_edge].edge[0]; } - indices.push_back( vertices.size() ); + indices.push_back( static_cast(vertices.size()) ); vertices.push_back(obj.vertices[ next_vert ].val); cur_edge = next_edge; @@ -287,11 +287,11 @@ void NDOImporter::InternReadFile( const std::string& pFile, } } - f.mIndices = new unsigned int[f.mNumIndices = indices.size()]; + f.mIndices = new unsigned int[f.mNumIndices = static_cast(indices.size())]; std::copy(indices.begin(),indices.end(),f.mIndices); } - mesh->mVertices = new aiVector3D[mesh->mNumVertices = vertices.size()]; + mesh->mVertices = new aiVector3D[mesh->mNumVertices = static_cast(vertices.size())]; std::copy(vertices.begin(),vertices.end(),mesh->mVertices); if (mesh->mNumVertices) { -- 2.7.4