update to bullet 2.87

This commit is contained in:
Johxz 2018-02-04 21:49:50 -06:00
parent cfbdf63cd7
commit 8de2bf807f
153 changed files with 6111 additions and 3756 deletions

View file

@ -52,7 +52,7 @@ struct btHashString
{
int ret = 0 ;
while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst)
while( ! (ret = *(const unsigned char *)src - *(const unsigned char *)dst) && *dst)
++src, ++dst;
if ( ret < 0 )
@ -79,6 +79,11 @@ class btHashInt
{
int m_uid;
public:
btHashInt()
{
}
btHashInt(int uid) :m_uid(uid)
{
}
@ -100,9 +105,10 @@ public:
//to our success
SIMD_FORCE_INLINE unsigned int getHash()const
{
int key = m_uid;
unsigned int key = m_uid;
// Thomas Wang's hash
key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
return key;
}
};
@ -115,7 +121,7 @@ class btHashPtr
union
{
const void* m_pointer;
int m_hashValues[2];
unsigned int m_hashValues[2];
};
public:
@ -140,8 +146,7 @@ public:
{
const bool VOID_IS_8 = ((sizeof(void*)==8));
int key = VOID_IS_8? m_hashValues[0]+m_hashValues[1] : m_hashValues[0];
unsigned 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);
return key;
@ -174,7 +179,7 @@ public:
//to our success
SIMD_FORCE_INLINE unsigned int getHash()const
{
int key = m_uid;
unsigned int key = m_uid;
// Thomas Wang's hash
key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
return key;
@ -206,7 +211,7 @@ public:
//to our success
SIMD_FORCE_INLINE unsigned int getHash()const
{
int key = m_uid;
unsigned int key = m_uid;
// Thomas Wang's hash
key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
return key;
@ -384,28 +389,38 @@ protected:
const Value* getAtIndex(int index) const
{
btAssert(index < m_valueArray.size());
return &m_valueArray[index];
btAssert(index>=0);
if (index>=0 && index < m_valueArray.size())
{
return &m_valueArray[index];
}
return 0;
}
Value* getAtIndex(int index)
{
btAssert(index < m_valueArray.size());
return &m_valueArray[index];
btAssert(index>=0);
if (index>=0 && index < m_valueArray.size())
{
return &m_valueArray[index];
}
return 0;
}
Key getKeyAtIndex(int index)
{
btAssert(index < m_keyArray.size());
return m_keyArray[index];
btAssert(index>=0);
return m_keyArray[index];
}
const Key getKeyAtIndex(int index) const
{
btAssert(index < m_keyArray.size());
return m_keyArray[index];
}
btAssert(index>=0);
return m_keyArray[index];
}
Value* operator[](const Key& key) {