Bullet 2.85 update

This commit is contained in:
rextimmy 2016-12-28 18:32:21 +10:00
parent 38bf2b8175
commit 540c9b72c0
391 changed files with 32183 additions and 58559 deletions

View file

@ -39,6 +39,12 @@ subject to the following restrictions:
#include <new> //for placement new
#endif //BT_USE_PLACEMENT_NEW
// The register keyword is deprecated in C++11 so don't use it.
#if __cplusplus > 199711L
#define BT_REGISTER
#else
#define BT_REGISTER register
#endif
///The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods
///It is developed to replace stl::vector to avoid portability issues, including STL alignment issues to add SIMD/SSE data
@ -202,24 +208,16 @@ protected:
///when the new number of elements is smaller, the destructor will be called, but memory will not be freed, to reduce performance overhead of run-time memory (de)allocations.
SIMD_FORCE_INLINE void resizeNoInitialize(int newsize)
{
int curSize = size();
if (newsize < curSize)
if (newsize > size())
{
} else
{
if (newsize > size())
{
reserve(newsize);
}
//leave this uninitialized
reserve(newsize);
}
m_size = newsize;
}
SIMD_FORCE_INLINE void resize(int newsize, const T& fillData=T())
{
int curSize = size();
const BT_REGISTER int curSize = size();
if (newsize < curSize)
{
@ -229,7 +227,7 @@ protected:
}
} else
{
if (newsize > size())
if (newsize > curSize)
{
reserve(newsize);
}
@ -246,7 +244,7 @@ protected:
}
SIMD_FORCE_INLINE T& expandNonInitializing( )
{
int sz = size();
const BT_REGISTER int sz = size();
if( sz == capacity() )
{
reserve( allocSize(size()) );
@ -259,7 +257,7 @@ protected:
SIMD_FORCE_INLINE T& expand( const T& fillValue=T())
{
int sz = size();
const BT_REGISTER int sz = size();
if( sz == capacity() )
{
reserve( allocSize(size()) );
@ -275,7 +273,7 @@ protected:
SIMD_FORCE_INLINE void push_back(const T& _Val)
{
int sz = size();
const BT_REGISTER int sz = size();
if( sz == capacity() )
{
reserve( allocSize(size()) );
@ -324,7 +322,7 @@ protected:
{
public:
bool operator() ( const T& a, const T& b )
bool operator() ( const T& a, const T& b ) const
{
return ( a < b );
}