summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2012-09-14 08:46:21 -0400
committerOz Linden <oz@lindenlab.com>2012-09-14 08:46:21 -0400
commit688a0b9fc25338a1d8a7f9a9cf2bb901cab7d709 (patch)
tree298e04362dce359b9db6f77a57ad7b673e193ccd
parent3f71d3b41c938fd5d433da6ca1b404586c49c401 (diff)
parent8f7bb8f6d58dfa1d0b160948b2ca790cd6d4ae5c (diff)
merge fixes for alignment test
-rw-r--r--indra/llmath/tests/alignment_test.cpp31
1 files changed, 21 insertions, 10 deletions
diff --git a/indra/llmath/tests/alignment_test.cpp b/indra/llmath/tests/alignment_test.cpp
index 5c426c57c3..9105b1c1fd 100644
--- a/indra/llmath/tests/alignment_test.cpp
+++ b/indra/llmath/tests/alignment_test.cpp
@@ -34,16 +34,6 @@
#include "../llsimdmath.h"
#include "../llvector4a.h"
-void* operator new(size_t size)
-{
- return ll_aligned_malloc_16(size);
-}
-
-void operator delete(void *p)
-{
- ll_aligned_free_16(p);
-}
-
namespace tut
{
@@ -59,6 +49,27 @@ tut::alignment_test_t tut_alignment_test("LLAlignment");
LL_ALIGN_PREFIX(16)
class MyVector4a
{
+public:
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void *p)
+ {
+ ll_aligned_free_16(p);
+ }
+
+ void* operator new[](size_t count)
+ { // try to allocate count bytes for an array
+ return ll_aligned_malloc_16(count);
+ }
+
+ void operator delete[](void *p)
+ {
+ ll_aligned_free_16(p);
+ }
+
LLQuad mQ;
} LL_ALIGN_POSTFIX(16);