From f30d95ee5feaa3a20ec2f7091324d21179edbbba Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 8 Jun 2018 14:19:46 +0100
Subject: [PATCH] SL-915 - more on alignment for 32-bit

---
 indra/llmath/llrigginginfo.cpp |  3 ++-
 indra/llmath/llrigginginfo.h   | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/indra/llmath/llrigginginfo.cpp b/indra/llmath/llrigginginfo.cpp
index 73e1b096cbf..885acb7670f 100644
--- a/indra/llmath/llrigginginfo.cpp
+++ b/indra/llmath/llrigginginfo.cpp
@@ -86,7 +86,8 @@ void LLJointRiggingInfo::merge(const LLJointRiggingInfo& other)
 
 LLJointRiggingInfoTab::LLJointRiggingInfoTab():
     mRigInfoPtr(NULL),
-    mSize(0)
+    mSize(0),
+    mNeedsUpdate(true)
 {
 }
 
diff --git a/indra/llmath/llrigginginfo.h b/indra/llmath/llrigginginfo.h
index b09746a5b75..b3d6bc2d19d 100644
--- a/indra/llmath/llrigginginfo.h
+++ b/indra/llmath/llrigginginfo.h
@@ -55,6 +55,17 @@ class LLJointRiggingInfo
 		ll_aligned_free_16(ptr);
 	}
 
+	void* operator new[](size_t size)
+	{
+		return ll_aligned_malloc_16(size);
+	}
+
+	void operator delete[](void* ptr)
+	{
+		ll_aligned_free_16(ptr);
+	}
+
+
 private:
 	LL_ALIGN_16(LLVector4a mRiggedExtents[2]);
     bool mIsRiggedTo;
@@ -74,6 +85,8 @@ class LLJointRiggingInfoTab
     void merge(const LLJointRiggingInfoTab& src);
     LLJointRiggingInfo& operator[](S32 i) { return mRigInfoPtr[i]; }
     const LLJointRiggingInfo& operator[](S32 i) const { return mRigInfoPtr[i]; };
+    bool needsUpdate() { return mNeedsUpdate; }
+    void setNeedsUpdate(bool val) { mNeedsUpdate = val; }
 private:
     // Not implemented
     LLJointRiggingInfoTab& operator=(const LLJointRiggingInfoTab& src);
@@ -81,6 +94,7 @@ class LLJointRiggingInfoTab
 
     LLJointRiggingInfo *mRigInfoPtr;
     S32 mSize;
+    bool mNeedsUpdate;
 };
 
 #endif
-- 
GitLab