diff --git a/code/nel/include/nel/misc/fixed_size_allocator.h b/code/nel/include/nel/misc/fixed_size_allocator.h index 80b9ed491..079c54bc0 100644 --- a/code/nel/include/nel/misc/fixed_size_allocator.h +++ b/code/nel/include/nel/misc/fixed_size_allocator.h @@ -53,8 +53,8 @@ public: uint getNumAllocatedBlocks() const { return _NumAlloc; } private: class CChunk; - NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT) - class CNode + + class NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT) CNode { public: CChunk *Chunk; // the Chunk this node belongs to. diff --git a/code/nel/include/nel/misc/matrix.h b/code/nel/include/nel/misc/matrix.h index 5d1b285f5..7f00b1cea 100644 --- a/code/nel/include/nel/misc/matrix.h +++ b/code/nel/include/nel/misc/matrix.h @@ -57,8 +57,8 @@ class CPlane; * \author Nevrax France * \date 2000 */ -NL_ALIGN_SSE2 -class CMatrix + +class NL_ALIGN_SSE2 CMatrix { public: /// Rotation Order. @@ -362,8 +362,8 @@ public: friend CPlane operator*(const CPlane &p, const CMatrix &m); #ifdef NL_HAS_SSE2 - inline CMatrix44F &getMatrix44F() { testExpandRot(); testExpandProj(); return MF; } - inline const CMatrix44F &getMatrix44F() const { testExpandRot(); testExpandProj(); return MF; } + inline CMatrix44F &getMatrix44F() { testExpandRotEx(); testExpandProjEx(); return MF; } + inline const CMatrix44F &getMatrix44F() const { testExpandRotEx(); testExpandProjEx(); return MF; } #else inline CMatrix44F &getMatrix44F() { return reinterpret_cast(*this); } inline const CMatrix44F &getMatrix44F() const { return reinterpret_cast(*this); } @@ -426,6 +426,9 @@ private: void testExpandRot() const; void testExpandProj() const; + void testExpandRotEx() const; + void testExpandProjEx() const; + // inline void setScaleUni(float scale); }; diff --git a/code/nel/include/nel/misc/types_nl.h b/code/nel/include/nel/misc/types_nl.h index b8426bfaa..346632a6a 100644 --- a/code/nel/include/nel/misc/types_nl.h +++ b/code/nel/include/nel/misc/types_nl.h @@ -342,7 +342,7 @@ typedef unsigned int uint; // at least 32bits (depend of processor) // #ifdef NL_ENABLE_FORCE_INLINE # ifdef NL_COMP_VC # define NL_FORCE_INLINE __forceinline -# elif NL_COMP_GCC +# elif defined(NL_COMP_GCC) # define NL_FORCE_INLINE inline __attribute__((always_inline)) # else # define NL_FORCE_INLINE inline @@ -358,7 +358,10 @@ typedef unsigned int uint; // at least 32bits (depend of processor) #define NL_ALIGN(nb) __attribute__((aligned(nb))) #endif -#ifdef NL_COMP_VC +#ifdef NL_OS_WINDOWS +#include +#include +#include inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); } inline void aligned_free(void *ptr) { _aligned_free(ptr); } #else diff --git a/code/nel/src/misc/matrix.cpp b/code/nel/src/misc/matrix.cpp index 38d8eaf78..79e31b5f2 100644 --- a/code/nel/src/misc/matrix.cpp +++ b/code/nel/src/misc/matrix.cpp @@ -145,6 +145,11 @@ inline void CMatrix::testExpandRot() const self->Scale33= 1; } } +void CMatrix::testExpandRotEx() const +{ + testExpandRot(); +} + inline void CMatrix::testExpandProj() const { if(hasProj()) @@ -156,6 +161,10 @@ inline void CMatrix::testExpandProj() const self->a41=0; self->a42=0; self->a43=0; self->a44=1; } } +void CMatrix::testExpandProjEx() const +{ + testExpandProj(); +} // ======================================================================================================