summaryrefslogtreecommitdiff
path: root/indra/newview/llpolymorph.h
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-09-20 18:48:15 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-09-20 18:48:15 -0700
commit29cdf94e95d0a4365bd18860c4759f9a6a13f45a (patch)
tree39e86ea1f7cb8e05547416d303d63dbbeab85937 /indra/newview/llpolymorph.h
parent5ec24ecd69986eada6e185e922df5a82bc7dd48d (diff)
Correcting dynamic allocation issues with classes that have aligned data members.
Diffstat (limited to 'indra/newview/llpolymorph.h')
-rw-r--r--indra/newview/llpolymorph.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llpolymorph.h b/indra/newview/llpolymorph.h
index 46e23b7792..678599d7e1 100644
--- a/indra/newview/llpolymorph.h
+++ b/indra/newview/llpolymorph.h
@@ -48,6 +48,16 @@ public:
~LLPolyMorphData();
LLPolyMorphData(const LLPolyMorphData &rhs);
+ void* operator new(size_t size)
+ {
+ return ll_aligned_malloc_16(size);
+ }
+
+ void operator delete(void* ptr)
+ {
+ ll_aligned_free_16(ptr);
+ }
+
BOOL loadBinary(LLFILE* fp, LLPolyMeshSharedData *mesh);
const std::string& getName() { return mName; }
@@ -67,6 +77,9 @@ public:
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
+
+private:
+ void freeData();
};
//-----------------------------------------------------------------------------