From ca1c42f07f3312c9dd2f1a644ed2529f9718fec6 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Sat, 16 Jun 2007 00:24:28 +0000 Subject: [PATCH] use for replacement new --- src/LinearMath/btAlignedObjectArray.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/LinearMath/btAlignedObjectArray.h b/src/LinearMath/btAlignedObjectArray.h index 8572da2c6..6e8ec3a88 100644 --- a/src/LinearMath/btAlignedObjectArray.h +++ b/src/LinearMath/btAlignedObjectArray.h @@ -24,12 +24,18 @@ subject to the following restrictions: ///then the btAlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors ///see discussion here: http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1231 #define USE_NEW_INPLACE_NEW 1 + #ifdef USE_NEW_INPLACE_NEW -#include //in-place new -#include //memcpy +#include //for replacement new + +#ifndef WIN32 +#include //for memcpy +#endif + #endif //USE_NEW_INPLACE_NEW + ///btAlignedObjectArray uses a subset of the stl::vector interface for its methods ///It is developed to replace stl::vector to avoid STL alignment issues to add SIMD/SSE data template @@ -168,7 +174,7 @@ class btAlignedObjectArray } - SIMD_FORCE_INLINE T& expand( T& fillValue=T()) + SIMD_FORCE_INLINE T& expand( const T& fillValue=T()) { int sz = size(); if( sz == capacity() )