From 923b0144722248c80b093afa1ec80c971fdb2e86 Mon Sep 17 00:00:00 2001 From: Jared Mulconry Date: Sun, 20 Nov 2016 02:40:18 +1100 Subject: [PATCH] Fixed build warnings on MSVC14 x64 in the MD3 and MD5 format sources. --- code/MD3Loader.cpp | 2 +- code/MD5Loader.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/MD3Loader.cpp b/code/MD3Loader.cpp index a99fb06b1..0736e84b9 100644 --- a/code/MD3Loader.cpp +++ b/code/MD3Loader.cpp @@ -709,7 +709,7 @@ void MD3Importer::ConvertPath(const char* texture_name, const char* header_name, } } else len2 = std::min (len1, (size_t)(end2 - texture_name )); - if (!ASSIMP_strincmp(texture_name,header_name,len2)) { + if (!ASSIMP_strincmp(texture_name,header_name,static_cast(len2))) { // Use the file name only out = end2+1; return; diff --git a/code/MD5Loader.cpp b/code/MD5Loader.cpp index 8c66f6507..0703e92de 100644 --- a/code/MD5Loader.cpp +++ b/code/MD5Loader.cpp @@ -228,8 +228,8 @@ void MD5Importer::MakeDataUnique (MD5::MeshDesc& meshSrc) std::vector abHad(meshSrc.mVertices.size(),false); // allocate enough storage to keep the output structures - const unsigned int iNewNum = meshSrc.mFaces.size()*3; - unsigned int iNewIndex = meshSrc.mVertices.size(); + const unsigned int iNewNum = static_cast(meshSrc.mFaces.size()*3); + unsigned int iNewIndex = static_cast(meshSrc.mVertices.size()); meshSrc.mVertices.resize(iNewNum); // try to guess how much storage we'll need for new weights @@ -719,16 +719,16 @@ void MD5Importer::LoadMD5CameraFile () // every cut is written to a separate aiAnimation if (!cuts.size()) { cuts.push_back(0); - cuts.push_back(frames.size()-1); + cuts.push_back(static_cast(frames.size()-1)); } else { cuts.insert(cuts.begin(),0); if (cuts.back() < frames.size()-1) - cuts.push_back(frames.size()-1); + cuts.push_back(static_cast(frames.size()-1)); } - pScene->mNumAnimations = cuts.size()-1; + pScene->mNumAnimations = static_cast(cuts.size()-1); aiAnimation** tmp = pScene->mAnimations = new aiAnimation*[pScene->mNumAnimations]; for (std::vector::const_iterator it = cuts.begin(); it != cuts.end()-1; ++it) {