Merge pull request #1941 from ShFil119/impr/remove_register

Remove unneeded keyword `register`
This commit is contained in:
erwincoumans 2019-01-04 07:58:16 -08:00 committed by GitHub
commit 3729b733de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,13 +38,6 @@ subject to the following restrictions:
#include <new> //for placement new #include <new> //for placement new
#endif //BT_USE_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 ///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 ///It is developed to replace stl::vector to avoid portability issues, including STL alignment issues to add SIMD/SSE data
template <typename T> template <typename T>
@ -209,7 +202,7 @@ public:
SIMD_FORCE_INLINE void resize(int newsize, const T& fillData = T()) SIMD_FORCE_INLINE void resize(int newsize, const T& fillData = T())
{ {
const BT_REGISTER int curSize = size(); const int curSize = size();
if (newsize < curSize) if (newsize < curSize)
{ {
@ -236,7 +229,7 @@ public:
} }
SIMD_FORCE_INLINE T& expandNonInitializing() SIMD_FORCE_INLINE T& expandNonInitializing()
{ {
const BT_REGISTER int sz = size(); const int sz = size();
if (sz == capacity()) if (sz == capacity())
{ {
reserve(allocSize(size())); reserve(allocSize(size()));
@ -248,7 +241,7 @@ public:
SIMD_FORCE_INLINE T& expand(const T& fillValue = T()) SIMD_FORCE_INLINE T& expand(const T& fillValue = T())
{ {
const BT_REGISTER int sz = size(); const int sz = size();
if (sz == capacity()) if (sz == capacity())
{ {
reserve(allocSize(size())); reserve(allocSize(size()));
@ -263,7 +256,7 @@ public:
SIMD_FORCE_INLINE void push_back(const T& _Val) SIMD_FORCE_INLINE void push_back(const T& _Val)
{ {
const BT_REGISTER int sz = size(); const int sz = size();
if (sz == capacity()) if (sz == capacity())
{ {
reserve(allocSize(size())); reserve(allocSize(size()));