Skip to content
Snippets Groups Projects
Commit f81c5a4e authored by callum_linden's avatar callum_linden
Browse files

Add bespoke ctor/dtor that align on 16byte boundaries when creating things on the heap

parent a2bb483f
No related branches found
No related tags found
No related merge requests found
...@@ -182,6 +182,16 @@ class LLPolyMorphTarget : public LLViewerVisualParam ...@@ -182,6 +182,16 @@ class LLPolyMorphTarget : public LLViewerVisualParam
void applyMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert); void applyMask(U8 *maskData, S32 width, S32 height, S32 num_components, BOOL invert);
void addPendingMorphMask() { mNumMorphMasksPending++; } void addPendingMorphMask() { mNumMorphMasksPending++; }
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
}
void operator delete(void* ptr)
{
ll_aligned_free_16(ptr);
}
protected: protected:
LLPolyMorphTarget(const LLPolyMorphTarget& pOther); LLPolyMorphTarget(const LLPolyMorphTarget& pOther);
......
...@@ -73,6 +73,19 @@ class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo ...@@ -73,6 +73,19 @@ class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
/*virtual*/ BOOL parseXml(LLXmlTreeNode* node); /*virtual*/ BOOL parseXml(LLXmlTreeNode* node);
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
}
void operator delete(void* ptr)
{
ll_aligned_free_16(ptr);
}
protected: protected:
typedef std::vector<LLPolySkeletalBoneInfo> bone_info_list_t; typedef std::vector<LLPolySkeletalBoneInfo> bone_info_list_t;
bone_info_list_t mBoneInfoList; bone_info_list_t mBoneInfoList;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment