Skip to content

Commit

Permalink
Fix compiler warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkulling committed Mar 13, 2019
1 parent 152cdde commit 0dc2e91
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion code/AssbinLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion code/FBXConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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]();
Expand Down
4 changes: 2 additions & 2 deletions code/SMDLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions test/unit/utSTLImportExport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion tools/assimp_view/SceneAnimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0dc2e91

Please sign in to comment.