From 9b6b99842dce923b2c95e5356ff6c39b33161e6b Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Mon, 23 Aug 2010 18:13:36 +0000 Subject: [PATCH] Blenderloader: get rid of some type mismatch warnings in 32 bit mode. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@800 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/BlenderLoader.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index 68e487a77..621c6455d 100644 --- a/code/BlenderLoader.cpp +++ b/code/BlenderLoader.cpp @@ -426,7 +426,7 @@ void BlenderImporter::ResolveImage(MaterialHelper* out, const Material* mat, con tex->mWidth = img->packedfile->size; uint8_t* ch = new uint8_t[tex->mWidth]; - conv_data.db.reader->SetCurrentPos(img->packedfile->data->val); + conv_data.db.reader->SetCurrentPos(static_cast( img->packedfile->data->val)); conv_data.db.reader->CopyAndAdvance(ch,tex->mWidth); tex->pcData = reinterpret_cast(ch); @@ -648,7 +648,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh // of the material entry within the list of resolved materials. if (mesh->mat) { - if (it.first >= mesh->mat.size() ) { + if (static_cast ( it.first ) >= mesh->mat.size() ) { ThrowException("Material index is out of range"); } @@ -754,7 +754,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh // collect texture coordinates, they're stored in a separate per-face buffer if (mesh->mtface) { - if (mesh->totface > mesh->mtface.size()) { + if (mesh->totface > static_cast ( mesh->mtface.size())) { ThrowException("Number of UV faces is larger than the corresponding UV face array (#1)"); } for (std::vector::iterator it = temp->begin()+old; it != temp->end(); ++it) { @@ -780,7 +780,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh // collect texture coordinates, old-style (marked as deprecated in current blender sources) if (mesh->tface) { - if (mesh->totface > mesh->mtface.size()) { + if (mesh->totface > static_cast ( mesh->mtface.size())) { ThrowException("Number of faces is larger than the corresponding UV face array (#2)"); } for (std::vector::iterator it = temp->begin()+old; it != temp->end(); ++it) { @@ -806,7 +806,7 @@ void BlenderImporter::ConvertMesh(const Scene& in, const Object* obj, const Mesh // collect vertex colors, stored separately as well if (mesh->mcol) { - if (mesh->totface > (mesh->mcol.size()/4)) { + if (mesh->totface > static_cast ( (mesh->mcol.size()/4)) ) { ThrowException("Number of faces is larger than the corresponding color face array"); } for (std::vector::iterator it = temp->begin()+old; it != temp->end(); ++it) {