bugfix: fix compiler warnings for gcc-4.8.1.

pull/256/merge
Kim Kulling 2014-04-21 16:18:14 +02:00
parent a0ba3a8ade
commit aae01c47ad
4 changed files with 6 additions and 15 deletions

View File

@ -109,11 +109,11 @@ void BlenderBMeshConverter::AssertValidMesh( )
// ------------------------------------------------------------------------------------------------
void BlenderBMeshConverter::AssertValidSizes( )
{
if ( BMesh->totpoly != BMesh->mpoly.size( ) )
if ( BMesh->totpoly != static_cast<int>( BMesh->mpoly.size( ) ) )
{
ThrowException( "BMesh poly array has incorrect size" );
}
if ( BMesh->totloop != BMesh->mloop.size( ) )
if ( BMesh->totloop != static_cast<int>( BMesh->mloop.size( ) ) )
{
ThrowException( "BMesh loop array has incorrect size" );
}

View File

@ -251,10 +251,7 @@ template <> void Structure :: Convert<Base> (
const int initial_pos = db.reader->GetCurrentPos();
std::pair<Base*, int> todo = std::make_pair(&dest, initial_pos);
Base* saved_prev = NULL;
while(true) {
for ( ;; ) {
Base& cur_dest = *todo.first;
db.reader->SetCurrentPos(todo.second);
@ -265,10 +262,6 @@ template <> void Structure :: Convert<Base> (
ReadFieldPtr<ErrorPolicy_Warn>(cur_dest.object,"*object",db);
// just record the offset of the blob data and allocate storage.
// Does _not_ invoke Convert() recursively.
const int old = db.reader->GetCurrentPos();
// the return value of ReadFieldPtr indicates whether the object
// was already cached. In this case, we don't need to resolve
// it again.

View File

@ -51,11 +51,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BlenderBMesh.h"
#include "BlenderTessellator.h"
#define BLEND_TESS_MAGIC ( 0x83ed9ac3 )
static const unsigned int BLEND_TESS_MAGIC = 0x83ed9ac3;
#if ASSIMP_BLEND_WITH_GLU_TESSELLATE
namespace Assimp
namspace Assimp
{
template< > const std::string LogFunctions< BlenderTessellatorGL >::log_prefix = "BLEND_TESS_GL: ";
}
@ -382,7 +382,7 @@ inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& poi
{
unsigned int pointOffset = OffsetOf( PointP2T, point2D );
PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset );
if ( pointStruct.magic != BLEND_TESS_MAGIC )
if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) )
{
ThrowException( "Point returned by poly2tri was probably not one of ours. This indicates we need a new way to store vertex information" );
}

View File

@ -326,8 +326,6 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv
return;
}
const std::vector<IfcVector3>& in = result.verts;
const unsigned int cnt_segments = 16;
const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments;