Fix compiler warnings.

pull/2371/head
kkulling 2019-03-13 14:40:02 +01:00
parent 152cddedd3
commit 0dc2e9197a
5 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -964,7 +964,7 @@ namespace Assimp {
{
if (indices[i] < 0) epcount++;
}
unsigned int pcount = indices.size();
unsigned int pcount = static_cast<unsigned int>( indices.size() );
unsigned int scount = out_mesh->mNumFaces = pcount - epcount;
aiFace* fac = out_mesh->mFaces = new aiFace[scount]();

View File

@ -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<int>( 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<unsigned int>( asBones.size() );
anim->mTicksPerSecond = 25.0; // FIXME: is this correct?
aiNodeAnim** pp = anim->mChannels = new aiNodeAnim*[anim->mNumChannels];

View File

@ -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<unsigned int>( numValidPoints );
int i = 0;
for (XYZ &p : points) {

View File

@ -90,7 +90,7 @@ void SceneAnimator::SetAnimIndex( size_t pAnimIndex) {
delete mAnimEvaluator; mAnimEvaluator = nullptr;
mNodesByName.clear();
mCurrentAnimIndex = pAnimIndex;
mCurrentAnimIndex = static_cast<int>( 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