Fixed build warnings on MSVC14 x64 in the NDO format sources.

pull/1083/head
Jared Mulconry 2016-11-20 12:27:04 +11:00
parent 745f754310
commit 8478b03f22
1 changed files with 4 additions and 4 deletions

View File

@ -257,7 +257,7 @@ void NDOImporter::InternReadFile( const std::string& pFile,
} }
aiMesh* mesh = new aiMesh(); 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<unsigned int>(face_table.size())];
vertices.clear(); vertices.clear();
vertices.reserve(4 * face_table.size()); // arbitrarily chosen 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_edge = obj.edges[cur_edge].edge[4];
next_vert = obj.edges[cur_edge].edge[0]; next_vert = obj.edges[cur_edge].edge[0];
} }
indices.push_back( vertices.size() ); indices.push_back( static_cast<unsigned int>(vertices.size()) );
vertices.push_back(obj.vertices[ next_vert ].val); vertices.push_back(obj.vertices[ next_vert ].val);
cur_edge = next_edge; 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<unsigned int>(indices.size())];
std::copy(indices.begin(),indices.end(),f.mIndices); std::copy(indices.begin(),indices.end(),f.mIndices);
} }
mesh->mVertices = new aiVector3D[mesh->mNumVertices = vertices.size()]; mesh->mVertices = new aiVector3D[mesh->mNumVertices = static_cast<unsigned int>(vertices.size())];
std::copy(vertices.begin(),vertices.end(),mesh->mVertices); std::copy(vertices.begin(),vertices.end(),mesh->mVertices);
if (mesh->mNumVertices) { if (mesh->mNumVertices) {