minor compile fixes for __CELLOS_LV2_

This commit is contained in:
erwin.coumans
2010-02-03 02:20:09 +00:00
parent 23c814f699
commit f34bb0176c
2 changed files with 12 additions and 4 deletions

View File

@@ -89,8 +89,14 @@ public:
class btHashPtr
{
union
{
void* m_pointer;
int m_hashValues[2];
};
public:
btHashPtr(void* ptr)
@@ -112,9 +118,8 @@ public:
SIMD_FORCE_INLINE unsigned int getHash()const
{
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
key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);

View File

@@ -19,7 +19,10 @@ subject to the following restrictions:
#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
#include "btStackAlloc.h"
#include "btHashMap.h"
#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
#include <memory.h>
#endif
#include <string.h>