diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 7adb8db6f..acba8b3dd 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -708,7 +708,7 @@ void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene, unsigned char * uncompressedData = new unsigned char[ uncompressedSize ]; - int res = uncompress( uncompressedData, &uncompressedSize, compressedData, len ); + int res = uncompress( uncompressedData, &uncompressedSize, compressedData, (uLong) len ); if(res != Z_OK) { delete [] uncompressedData; diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index c556d3bba..a61ae4006 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -964,7 +964,7 @@ namespace Assimp { { if (indices[i] < 0) epcount++; } - unsigned int pcount = indices.size(); + unsigned int pcount = static_cast( indices.size() ); unsigned int scount = out_mesh->mNumFaces = pcount - epcount; aiFace* fac = out_mesh->mFaces = new aiFace[scount](); diff --git a/code/SMDLoader.cpp b/code/SMDLoader.cpp index 00d92e0b4..4288bf9c3 100644 --- a/code/SMDLoader.cpp +++ b/code/SMDLoader.cpp @@ -486,7 +486,7 @@ void SMDImporter::CreateOutputAnimations(const std::string &pFile, IOSystem* pIO if (bLoadAnimationList) { GetAnimationFileList(pFile, pIOHandler, animFileList); } - int animCount = animFileList.size() + 1; + int animCount = static_cast( animFileList.size() + 1u ); pScene->mNumAnimations = 1; pScene->mAnimations = new aiAnimation*[animCount]; memset(pScene->mAnimations, 0, sizeof(aiAnimation*)*animCount); @@ -510,7 +510,7 @@ void SMDImporter::CreateOutputAnimation(int index, const std::string &name) { anim->mName.Set(name.c_str()); } anim->mDuration = dLengthOfAnim; - anim->mNumChannels = asBones.size(); + anim->mNumChannels = static_cast( asBones.size() ); anim->mTicksPerSecond = 25.0; // FIXME: is this correct? aiNodeAnim** pp = anim->mChannels = new aiNodeAnim*[anim->mNumChannels]; diff --git a/test/unit/utSTLImportExport.cpp b/test/unit/utSTLImportExport.cpp index b5518de23..0f90aacf9 100644 --- a/test/unit/utSTLImportExport.cpp +++ b/test/unit/utSTLImportExport.cpp @@ -152,10 +152,10 @@ TEST_F(utSTLImporterExporter, test_export_pointclouds) { auto pMesh = scene.mMeshes[0]; - long numValidPoints = points.size(); + size_t numValidPoints = points.size(); pMesh->mVertices = new aiVector3D[numValidPoints]; - pMesh->mNumVertices = numValidPoints; + pMesh->mNumVertices = static_cast( numValidPoints ); int i = 0; for (XYZ &p : points) { diff --git a/tools/assimp_view/SceneAnimator.cpp b/tools/assimp_view/SceneAnimator.cpp index c2ebeacb3..86fe46a9c 100644 --- a/tools/assimp_view/SceneAnimator.cpp +++ b/tools/assimp_view/SceneAnimator.cpp @@ -90,7 +90,7 @@ void SceneAnimator::SetAnimIndex( size_t pAnimIndex) { delete mAnimEvaluator; mAnimEvaluator = nullptr; mNodesByName.clear(); - mCurrentAnimIndex = pAnimIndex; + mCurrentAnimIndex = static_cast( pAnimIndex ); // create the internal node tree. Do this even in case of invalid animation index // so that the transformation matrices are properly set up to mimic the current scene