diff options
author | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2013-10-08 11:59:24 -0700 |
commit | 80dfbbaacd82179e54163ed48b1bc444e3becbd5 (patch) | |
tree | da3858b58b5ec9c34d6eefa60c4fe87fc5743249 /indra/llcommon/llalignedarray.h | |
parent | f7158bc5afcec1da8b9d2d5a4ed86921e62d4959 (diff) | |
parent | 2eeee8a9491398697a8f3167bc4f715a3970fc3a (diff) |
merge from 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..6f18bfe25c 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) |