Fixed build warnings on MSVC14 x64 in the STL format sources.
parent
f2e2aad647
commit
58e0d8c261
|
@ -245,7 +245,7 @@ void STLImporter::LoadASCIIFile()
|
||||||
positionBuffer.reserve(sizeEstimate);
|
positionBuffer.reserve(sizeEstimate);
|
||||||
normalBuffer.reserve(sizeEstimate);
|
normalBuffer.reserve(sizeEstimate);
|
||||||
|
|
||||||
while (IsAsciiSTL(sz, bufferEnd - sz))
|
while (IsAsciiSTL(sz, static_cast<unsigned int>(bufferEnd - sz)))
|
||||||
{
|
{
|
||||||
aiMesh* pMesh = new aiMesh();
|
aiMesh* pMesh = new aiMesh();
|
||||||
pMesh->mMaterialIndex = 0;
|
pMesh->mMaterialIndex = 0;
|
||||||
|
@ -367,8 +367,8 @@ void STLImporter::LoadASCIIFile()
|
||||||
pMesh->mNumFaces = 0;
|
pMesh->mNumFaces = 0;
|
||||||
throw DeadlyImportError("Normal buffer size does not match position buffer size");
|
throw DeadlyImportError("Normal buffer size does not match position buffer size");
|
||||||
}
|
}
|
||||||
pMesh->mNumFaces = positionBuffer.size() / 3;
|
pMesh->mNumFaces = static_cast<unsigned int>(positionBuffer.size() / 3);
|
||||||
pMesh->mNumVertices = positionBuffer.size();
|
pMesh->mNumVertices = static_cast<unsigned int>(positionBuffer.size());
|
||||||
pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
|
pMesh->mVertices = new aiVector3D[pMesh->mNumVertices];
|
||||||
memcpy(pMesh->mVertices, &positionBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
|
memcpy(pMesh->mVertices, &positionBuffer[0].x, pMesh->mNumVertices * sizeof(aiVector3D));
|
||||||
positionBuffer.clear();
|
positionBuffer.clear();
|
||||||
|
|
Loading…
Reference in New Issue