minor compile fixes for __CELLOS_LV2_
This commit is contained in:
@@ -90,7 +90,13 @@ public:
|
|||||||
|
|
||||||
class btHashPtr
|
class btHashPtr
|
||||||
{
|
{
|
||||||
|
|
||||||
|
union
|
||||||
|
{
|
||||||
void* m_pointer;
|
void* m_pointer;
|
||||||
|
int m_hashValues[2];
|
||||||
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
btHashPtr(void* ptr)
|
btHashPtr(void* ptr)
|
||||||
@@ -112,9 +118,8 @@ public:
|
|||||||
SIMD_FORCE_INLINE unsigned int getHash()const
|
SIMD_FORCE_INLINE unsigned int getHash()const
|
||||||
{
|
{
|
||||||
const bool VOID_IS_8 = ((sizeof(void*)==8));
|
const bool VOID_IS_8 = ((sizeof(void*)==8));
|
||||||
int* intPtr = (int*)&m_pointer;
|
|
||||||
|
|
||||||
int key = VOID_IS_8? intPtr[0]+intPtr[1] : intPtr[0];
|
int key = VOID_IS_8? m_hashValues[0]+m_hashValues[1] : m_hashValues[0];
|
||||||
|
|
||||||
// Thomas Wang's hash
|
// Thomas Wang's hash
|
||||||
key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
|
key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
|
||||||
|
|||||||
@@ -19,7 +19,10 @@ subject to the following restrictions:
|
|||||||
#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
|
#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
|
||||||
#include "btStackAlloc.h"
|
#include "btStackAlloc.h"
|
||||||
#include "btHashMap.h"
|
#include "btHashMap.h"
|
||||||
|
|
||||||
|
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
|
||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user