diff options
author | Stinson Linden <stinson@lindenlab.com> | 2014-05-23 21:56:44 +0100 |
---|---|---|
committer | Stinson Linden <stinson@lindenlab.com> | 2014-05-23 21:56:44 +0100 |
commit | 0160c514c5e0bc3e575b33ef27924a9c8c7c30cf (patch) | |
tree | cd181ea27a9193911ed6f3904345af4871464bcc /indra/llappearance/llpolyskeletaldistortion.cpp | |
parent | a13d2f7f706bc8d5a4ea103cde56bacea1dd82cc (diff) |
MAINT-4077: Refactoring to add copy constructors to the LLVisualParam class and all of its derived descendants in order to clarify ownership of memory pointers.
Diffstat (limited to 'indra/llappearance/llpolyskeletaldistortion.cpp')
-rw-r--r-- | indra/llappearance/llpolyskeletaldistortion.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index a72b446ace..b9c1ee340c 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -104,9 +104,25 @@ BOOL LLPolySkeletalDistortionInfo::parseXml(LLXmlTreeNode* node) // LLPolySkeletalDistortion() //----------------------------------------------------------------------------- LLPolySkeletalDistortion::LLPolySkeletalDistortion(LLAvatarAppearance *avatarp) + : LLViewerVisualParam(), + mDefaultVec(), + mJointScales(), + mJointOffsets(), + mAvatar(avatarp) +{ + mDefaultVec.splat(0.001f); +} + +//----------------------------------------------------------------------------- +// LLPolySkeletalDistortion() +//----------------------------------------------------------------------------- +LLPolySkeletalDistortion::LLPolySkeletalDistortion(const LLPolySkeletalDistortion &pOther) + : LLViewerVisualParam(pOther), + mDefaultVec(pOther.mDefaultVec), + mJointScales(pOther.mJointScales), + mJointOffsets(pOther.mJointOffsets), + mAvatar(pOther.mAvatar) { - mAvatar = avatarp; - mDefaultVec.splat(0.001f); } //----------------------------------------------------------------------------- @@ -171,9 +187,7 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) /*virtual*/ LLViewerVisualParam* LLPolySkeletalDistortion::cloneParam(LLWearable* wearable) const { - LLPolySkeletalDistortion *new_param = new LLPolySkeletalDistortion(mAvatar); - *new_param = *this; - return new_param; + return new LLPolySkeletalDistortion(*this); } //----------------------------------------------------------------------------- |