diff options
author | Merov Linden <merov@lindenlab.com> | 2014-05-30 14:19:53 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-05-30 14:19:53 -0700 |
commit | 68b62747edb7073dd3f4975e2b38388ae80d801c (patch) | |
tree | 73730fdc31d3d74a2ba69ad156217299115cd810 /indra/llcommon/llalignedarray.h | |
parent | a1afe50feb1c42cc21c7f89b4187a8f7abe0c9fc (diff) | |
parent | 644ca6a0f8a7759119814f88df93b8e838321a12 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/llcommon/llalignedarray.h')
-rw-r--r-- | indra/llcommon/llalignedarray.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/llalignedarray.h b/indra/llcommon/llalignedarray.h index ed8fd31205..b68e9e0f82 100644 --- a/indra/llcommon/llalignedarray.h +++ b/indra/llcommon/llalignedarray.h @@ -60,7 +60,7 @@ LLAlignedArray<T, alignment>::LLAlignedArray() template <class T, U32 alignment> LLAlignedArray<T, alignment>::~LLAlignedArray() { - ll_aligned_free(mArray); + ll_aligned_free<alignment>(mArray); mArray = NULL; mElementCount = 0; mCapacity = 0; @@ -74,7 +74,7 @@ void LLAlignedArray<T, alignment>::push_back(const T& elem) { mCapacity++; mCapacity *= 2; - T* new_buf = (T*) ll_aligned_malloc(mCapacity*sizeof(T), alignment); + T* new_buf = (T*) ll_aligned_malloc<alignment>(mCapacity*sizeof(T)); if (mArray) { ll_memcpy_nonaliased_aligned_16((char*)new_buf, (char*)mArray, sizeof(T)*mElementCount); @@ -86,7 +86,7 @@ void LLAlignedArray<T, alignment>::push_back(const T& elem) mArray[mElementCount++] = elem; //delete old array here to prevent error on a.push_back(a[0]) - ll_aligned_free(old_buf); + ll_aligned_free<alignment>(old_buf); } template <class T, U32 alignment> @@ -95,11 +95,11 @@ void LLAlignedArray<T, alignment>::resize(U32 size) if (mCapacity < size) { mCapacity = size+mCapacity*2; - T* new_buf = mCapacity > 0 ? (T*) ll_aligned_malloc(mCapacity*sizeof(T), alignment) : NULL; + T* new_buf = mCapacity > 0 ? (T*) ll_aligned_malloc<alignment>(mCapacity*sizeof(T)) : NULL; if (mArray) { ll_memcpy_nonaliased_aligned_16((char*) new_buf, (char*) mArray, sizeof(T)*mElementCount); - ll_aligned_free(mArray); + ll_aligned_free<alignment>(mArray); } /*for (U32 i = mElementCount; i < mCapacity; ++i) |