From 58e0d8c261da2c4401932cd2a724cb0efcb94198 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 27 Nov 2016 13:32:44 +1100 Subject: [PATCH] Fixed build warnings on MSVC14 x64 in the STL format sources. --- code/STLLoader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/STLLoader.cpp b/code/STLLoader.cpp index 0571e542b..7d3e3224c 100644 --- a/code/STLLoader.cpp +++ b/code/STLLoader.cpp @@ -245,7 +245,7 @@ void STLImporter::LoadASCIIFile() positionBuffer.reserve(sizeEstimate); normalBuffer.reserve(sizeEstimate); - while (IsAsciiSTL(sz, bufferEnd - sz)) + while (IsAsciiSTL(sz, static_cast(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(positionBuffer.size() / 3); + pMesh->mNumVertices = static_cast(positionBuffer.size()); pMesh->mVertices = new aiVector3D[pMesh->mNumVertices]; memcpy(pMesh->mVertices, &positionBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D)); positionBuffer.clear();