diff --git a/code/BlenderBMesh.cpp b/code/BlenderBMesh.cpp index 83ccd37fb..0e517f4c8 100644 --- a/code/BlenderBMesh.cpp +++ b/code/BlenderBMesh.cpp @@ -109,11 +109,11 @@ void BlenderBMeshConverter::AssertValidMesh( ) // ------------------------------------------------------------------------------------------------ void BlenderBMeshConverter::AssertValidSizes( ) { - if ( BMesh->totpoly != BMesh->mpoly.size( ) ) + if ( BMesh->totpoly != static_cast( BMesh->mpoly.size( ) ) ) { ThrowException( "BMesh poly array has incorrect size" ); } - if ( BMesh->totloop != BMesh->mloop.size( ) ) + if ( BMesh->totloop != static_cast( BMesh->mloop.size( ) ) ) { ThrowException( "BMesh loop array has incorrect size" ); } diff --git a/code/BlenderScene.cpp b/code/BlenderScene.cpp index 77b9f5f66..16f889c72 100644 --- a/code/BlenderScene.cpp +++ b/code/BlenderScene.cpp @@ -251,10 +251,7 @@ template <> void Structure :: Convert ( const int initial_pos = db.reader->GetCurrentPos(); std::pair 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 ( ReadFieldPtr(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. diff --git a/code/BlenderTessellator.cpp b/code/BlenderTessellator.cpp index 150183519..ffe794951 100644 --- a/code/BlenderTessellator.cpp +++ b/code/BlenderTessellator.cpp @@ -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( 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" ); } diff --git a/code/IFCGeometry.cpp b/code/IFCGeometry.cpp index 693db0f11..210370d90 100644 --- a/code/IFCGeometry.cpp +++ b/code/IFCGeometry.cpp @@ -325,8 +325,6 @@ void ProcessSweptDiskSolid(const IfcSweptDiskSolid solid, TempMesh& result, Conv IFCImporter::LogError("failed to convert Directrix curve (IfcSweptDiskSolid)"); return; } - - const std::vector& in = result.verts; const unsigned int cnt_segments = 16; const IfcFloat deltaAngle = AI_MATH_TWO_PI/cnt_segments;