Skip to content

Commit a8673d4

Browse files
authored
Merge pull request assimp#941 from assimp/feature/issue_940
Feature/issue 940
2 parents 1ed0814 + 4d012bc commit a8673d4

File tree

7 files changed

+273
-217
lines changed

7 files changed

+273
-217
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ ENDIF(NOT BUILD_SHARED_LIBS)
4646

4747
# Define here the needed parameters
4848
SET (ASSIMP_VERSION_MAJOR 3)
49-
SET (ASSIMP_VERSION_MINOR 2)
50-
SET (ASSIMP_VERSION_PATCH 0) # subversion revision?
49+
SET (ASSIMP_VERSION_MINOR 3)
50+
SET (ASSIMP_VERSION_PATCH 1) # subversion revision?
5151
SET (ASSIMP_VERSION ${ASSIMP_VERSION_MAJOR}.${ASSIMP_VERSION_MINOR}.${ASSIMP_VERSION_PATCH})
5252
SET (ASSIMP_SOVERSION 3)
5353
SET (PROJECT_VERSION "${ASSIMP_VERSION}")

code/BlenderTessellator.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5050
#include "BlenderBMesh.h"
5151
#include "BlenderTessellator.h"
5252

53+
#include <stddef.h>
54+
5355
static const unsigned int BLEND_TESS_MAGIC = 0x83ed9ac3;
5456

5557
#if ASSIMP_BLEND_WITH_GLU_TESSELLATE
@@ -372,14 +374,9 @@ void BlenderTessellatorP2T::ReferencePoints( std::vector< Blender::PointP2T >& p
372374
}
373375

374376
// ------------------------------------------------------------------------------------------------
375-
// Yes this is filthy... but we have no choice
376-
#define OffsetOf( Class, Member ) ( static_cast< unsigned int >( \
377-
reinterpret_cast<uint8_t*>(&( reinterpret_cast< Class* >( NULL )->*( &Class::Member ) )) - \
378-
static_cast<uint8_t*>(NULL) ) )
379-
380377
inline PointP2T& BlenderTessellatorP2T::GetActualPointStructure( p2t::Point& point ) const
381378
{
382-
unsigned int pointOffset = OffsetOf( PointP2T, point2D );
379+
unsigned int pointOffset = offsetof( PointP2T, point2D );
383380
PointP2T& pointStruct = *reinterpret_cast< PointP2T* >( reinterpret_cast< char* >( &point ) - pointOffset );
384381
if ( pointStruct.magic != static_cast<int>( BLEND_TESS_MAGIC ) )
385382
{

0 commit comments

Comments
 (0)