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

pull/1083/head
Jared Mulconry 2016-11-27 13:32:44 +11:00
parent f2e2aad647
commit 58e0d8c261
1 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ void STLImporter::LoadASCIIFile()
positionBuffer.reserve(sizeEstimate);
normalBuffer.reserve(sizeEstimate);
while (IsAsciiSTL(sz, bufferEnd - sz))
while (IsAsciiSTL(sz, static_cast<unsigned int>(bufferEnd - sz)))
{
aiMesh* pMesh = new aiMesh();
pMesh->mMaterialIndex = 0;
@ -367,8 +367,8 @@ void STLImporter::LoadASCIIFile()
pMesh->mNumFaces = 0;
throw DeadlyImportError("Normal buffer size does not match position buffer size");
}
pMesh->mNumFaces = positionBuffer.size() / 3;
pMesh->mNumVertices = positionBuffer.size();
pMesh->mNumFaces = static_cast<unsigned int>(positionBuffer.size() / 3);
pMesh->mNumVertices = static_cast<unsigned int>(positionBuffer.size());
pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
memcpy(pMesh->mVertices, &positionBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
positionBuffer.clear();