Browse Source

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

Jared Mulconry 8 years ago
parent
commit
58e0d8c261
1 changed files with 3 additions and 3 deletions
  1. 3 3
      code/STLLoader.cpp

+ 3 - 3
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<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();