diff --git a/code/BlenderTessellator.cpp b/code/BlenderTessellator.cpp index 2db7a2dff..e74b3524d 100644 --- a/code/BlenderTessellator.cpp +++ b/code/BlenderTessellator.cpp @@ -50,6 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "BlenderBMesh.h" #include "BlenderTessellator.h" +#include + static const unsigned int BLEND_TESS_MAGIC = 0x83ed9ac3; #if ASSIMP_BLEND_WITH_GLU_TESSELLATE @@ -373,13 +375,13 @@ void BlenderTessellatorP2T::ReferencePoints( std::vector< Blender::PointP2T >& p // ------------------------------------------------------------------------------------------------ // Yes this is filthy... but we have no choice -#define OffsetOf( Class, Member ) ( static_cast< unsigned int >( \ +/*#define OffsetOf( Class, Member ) ( static_cast< unsigned int >( \ reinterpret_cast(&( reinterpret_cast< Class* >( NULL )->*( &Class::Member ) )) - \ static_cast(NULL) ) ) - + */ inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const { - unsigned int pointOffset = OffsetOf( PointP2T, point2D ); + unsigned int pointOffset = offsetof( PointP2T, point2D ); PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset ); if ( pointStruct.magic != static_cast( BLEND_TESS_MAGIC ) ) { diff --git a/test/regression/db.zip b/test/regression/db.zip index d2687dd67..03a23f41e 100644 Binary files a/test/regression/db.zip and b/test/regression/db.zip differ diff --git a/test/unit/utLimitBoneWeights.cpp b/test/unit/utLimitBoneWeights.cpp index 4cb369586..9b38a2fa5 100644 --- a/test/unit/utLimitBoneWeights.cpp +++ b/test/unit/utLimitBoneWeights.cpp @@ -43,18 +43,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include - using namespace std; using namespace Assimp; class LimitBoneWeightsTest : public ::testing::Test { public: - virtual void SetUp(); virtual void TearDown(); protected: - LimitBoneWeightsProcess* piProcess; aiMesh* pcMesh; }; diff --git a/test/unit/utMaterialSystem.cpp b/test/unit/utMaterialSystem.cpp index 7948229fc..af31d19c8 100644 --- a/test/unit/utMaterialSystem.cpp +++ b/test/unit/utMaterialSystem.cpp @@ -43,19 +43,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include - -using namespace std; -using namespace Assimp; +using namespace ::std; +using namespace ::Assimp; class MaterialSystemTest : public ::testing::Test { public: - virtual void SetUp() { this->pcMat = new aiMaterial(); } virtual void TearDown() { delete this->pcMat; } protected: - aiMaterial* pcMat; }; diff --git a/test/unit/utMatrix3x3.cpp b/test/unit/utMatrix3x3.cpp index e2496c4b8..d013980d0 100644 --- a/test/unit/utMatrix3x3.cpp +++ b/test/unit/utMatrix3x3.cpp @@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "UnitTestPCH.h" #include -using namespace Assimp; +using namespace ::Assimp; class utMatrix3x3Test : public ::testing::Test {