From 6e8cf17955fa0ec91d4215726d061ddc69bc19c2 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Mon, 24 Aug 2020 05:41:24 -0400 Subject: [PATCH] Default empty destructors in llappearance --- indra/llappearance/llavatarappearancedefines.cpp | 5 ----- indra/llappearance/llavatarappearancedefines.h | 2 +- indra/llappearance/llavatarjoint.cpp | 9 --------- indra/llappearance/llavatarjoint.h | 4 ++-- indra/llappearance/lldriverparam.cpp | 4 ---- indra/llappearance/lldriverparam.h | 4 ++-- indra/llappearance/llpolymesh.h | 2 +- indra/llappearance/llpolymorph.h | 2 +- indra/llappearance/llpolyskeletaldistortion.cpp | 7 ------- indra/llappearance/llpolyskeletaldistortion.h | 4 ++-- indra/llappearance/lltexglobalcolor.cpp | 13 ------------- indra/llappearance/lltexglobalcolor.h | 6 ++++-- indra/llappearance/lltexlayer.cpp | 8 -------- indra/llappearance/lltexlayer.h | 6 +++--- indra/llappearance/lltexlayerparams.cpp | 4 ---- indra/llappearance/lltexlayerparams.h | 6 +++--- indra/llappearance/lltexturemanagerbridge.h | 2 +- indra/llappearance/llviewervisualparam.cpp | 11 ----------- indra/llappearance/llviewervisualparam.h | 4 ++-- indra/llappearance/llwearabledata.cpp | 5 ----- indra/llappearance/llwearabledata.h | 2 +- 21 files changed, 23 insertions(+), 87 deletions(-) diff --git a/indra/llappearance/llavatarappearancedefines.cpp b/indra/llappearance/llavatarappearancedefines.cpp index bce43fec642..4fe26f59416 100644 --- a/indra/llappearance/llavatarappearancedefines.cpp +++ b/indra/llappearance/llavatarappearancedefines.cpp @@ -175,11 +175,6 @@ LLAvatarAppearanceDictionary::LLAvatarAppearanceDictionary() createAssociations(); } -//virtual -LLAvatarAppearanceDictionary::~LLAvatarAppearanceDictionary() -{ -} - // Baked textures are composites of textures; for each such composited texture, // map it to the baked texture. void LLAvatarAppearanceDictionary::createAssociations() diff --git a/indra/llappearance/llavatarappearancedefines.h b/indra/llappearance/llavatarappearancedefines.h index 88df2392414..04acfabcd01 100644 --- a/indra/llappearance/llavatarappearancedefines.h +++ b/indra/llappearance/llavatarappearancedefines.h @@ -149,7 +149,7 @@ class LLAvatarAppearanceDictionary final : public LLSingleton<LLAvatarAppearance // Constructors and Destructors //-------------------------------------------------------------------- LLSINGLETON(LLAvatarAppearanceDictionary); - virtual ~LLAvatarAppearanceDictionary(); + virtual ~LLAvatarAppearanceDictionary() = default; private: void createAssociations(); diff --git a/indra/llappearance/llavatarjoint.cpp b/indra/llappearance/llavatarjoint.cpp index b6ff57f4865..5375fc3fbc5 100644 --- a/indra/llappearance/llavatarjoint.cpp +++ b/indra/llappearance/llavatarjoint.cpp @@ -76,15 +76,6 @@ void LLAvatarJoint::init() } -//----------------------------------------------------------------------------- -// ~LLAvatarJoint() -// Class Destructor -//----------------------------------------------------------------------------- -LLAvatarJoint::~LLAvatarJoint() -{ -} - - //-------------------------------------------------------------------- // setValid() //-------------------------------------------------------------------- diff --git a/indra/llappearance/llavatarjoint.h b/indra/llappearance/llavatarjoint.h index fec91503c78..d7e1df9cdf0 100644 --- a/indra/llappearance/llavatarjoint.h +++ b/indra/llappearance/llavatarjoint.h @@ -49,7 +49,7 @@ class LLAvatarJoint : LLAvatarJoint(S32 joint_num); // *TODO: Only used for LLVOAvatarSelf::mScreenp. *DOES NOT INITIALIZE mResetAfterRestoreOldXform* LLAvatarJoint(const std::string &name, LLJoint *parent = NULL); - virtual ~LLAvatarJoint(); + virtual ~LLAvatarJoint() = default; // Gets the validity of this joint BOOL getValid() { return mValid; } @@ -125,7 +125,7 @@ class LLAvatarJointCollisionVolume : public LLAvatarJoint { public: LLAvatarJointCollisionVolume(); - virtual ~LLAvatarJointCollisionVolume() {}; + virtual ~LLAvatarJointCollisionVolume() = default; /*virtual*/ BOOL inheritScale() { return TRUE; } /*virtual*/ U32 render( F32 pixelArea, BOOL first_pass = TRUE, BOOL is_dummy = FALSE ); diff --git a/indra/llappearance/lldriverparam.cpp b/indra/llappearance/lldriverparam.cpp index 062f9ceddea..9e25c138d0f 100644 --- a/indra/llappearance/lldriverparam.cpp +++ b/indra/llappearance/lldriverparam.cpp @@ -185,10 +185,6 @@ LLDriverParam::LLDriverParam(const LLDriverParam& pOther) llassert((mWearablep == NULL) || mAvatarAppearance->isSelf()); } -LLDriverParam::~LLDriverParam() -{ -} - BOOL LLDriverParam::setInfo(LLDriverParamInfo *info) { llassert(mInfo == NULL); diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h index 9c1cfb163e6..dd89092954e 100644 --- a/indra/llappearance/lldriverparam.h +++ b/indra/llappearance/lldriverparam.h @@ -63,7 +63,7 @@ class LLDriverParamInfo final : public LLViewerVisualParamInfo friend class LLDriverParam; public: LLDriverParamInfo(); - /*virtual*/ ~LLDriverParamInfo() {}; + /*virtual*/ ~LLDriverParamInfo() = default; /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); @@ -85,7 +85,7 @@ class LLDriverParam final : public LLViewerVisualParam LLDriverParam() {} public: LLDriverParam(LLAvatarAppearance *appearance, LLWearable* wearable = NULL); - ~LLDriverParam(); + ~LLDriverParam() = default; void* operator new(size_t size) { diff --git a/indra/llappearance/llpolymesh.h b/indra/llappearance/llpolymesh.h index 83659d9514c..479a1d2a029 100644 --- a/indra/llappearance/llpolymesh.h +++ b/indra/llappearance/llpolymesh.h @@ -146,7 +146,7 @@ class LLJointRenderData { public: LLJointRenderData(const LLMatrix4* world_matrix, LLSkinJoint* skin_joint) : mWorldMatrix(world_matrix), mSkinJoint(skin_joint) {} - ~LLJointRenderData(){} + ~LLJointRenderData() = default; const LLMatrix4* mWorldMatrix; LLSkinJoint* mSkinJoint; diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h index c6133cd8311..980ca930f0c 100644 --- a/indra/llappearance/llpolymorph.h +++ b/indra/llappearance/llpolymorph.h @@ -137,7 +137,7 @@ class LLPolyMorphTargetInfo : public LLViewerVisualParamInfo friend class LLPolyMorphTarget; public: LLPolyMorphTargetInfo(); - /*virtual*/ ~LLPolyMorphTargetInfo() {}; + /*virtual*/ ~LLPolyMorphTargetInfo() = default; /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); diff --git a/indra/llappearance/llpolyskeletaldistortion.cpp b/indra/llappearance/llpolyskeletaldistortion.cpp index d61d5c6491f..f2cd2229c28 100644 --- a/indra/llappearance/llpolyskeletaldistortion.cpp +++ b/indra/llappearance/llpolyskeletaldistortion.cpp @@ -126,13 +126,6 @@ LLPolySkeletalDistortion::LLPolySkeletalDistortion(const LLPolySkeletalDistortio { } -//----------------------------------------------------------------------------- -// ~LLPolySkeletalDistortion() -//----------------------------------------------------------------------------- -LLPolySkeletalDistortion::~LLPolySkeletalDistortion() -{ -} - BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info) { if (info->mID < 0) diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h index ab1a132d190..8fd1e1dba16 100644 --- a/indra/llappearance/llpolyskeletaldistortion.h +++ b/indra/llappearance/llpolyskeletaldistortion.h @@ -69,7 +69,7 @@ class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo public: LLPolySkeletalDistortionInfo(); - /*virtual*/ ~LLPolySkeletalDistortionInfo() {}; + /*virtual*/ ~LLPolySkeletalDistortionInfo() = default; /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); @@ -109,7 +109,7 @@ class LLPolySkeletalDistortion : public LLViewerVisualParam } LLPolySkeletalDistortion(LLAvatarAppearance *avatarp); - ~LLPolySkeletalDistortion(); + ~LLPolySkeletalDistortion() = default; // Special: These functions are overridden by child classes LLPolySkeletalDistortionInfo* getInfo() const { return (LLPolySkeletalDistortionInfo*)mInfo; } diff --git a/indra/llappearance/lltexglobalcolor.cpp b/indra/llappearance/lltexglobalcolor.cpp index 3df2254b142..01cc01b2de9 100644 --- a/indra/llappearance/lltexglobalcolor.cpp +++ b/indra/llappearance/lltexglobalcolor.cpp @@ -42,12 +42,6 @@ LLTexGlobalColor::LLTexGlobalColor(LLAvatarAppearance* appearance) { } -LLTexGlobalColor::~LLTexGlobalColor() -{ - // mParamColorList are LLViewerVisualParam's and get deleted with ~LLCharacter() - //std::for_each(mParamColorList.begin(), mParamColorList.end(), DeletePointer()); -} - BOOL LLTexGlobalColor::setInfo(LLTexGlobalColorInfo *info) { llassert(mInfo == NULL); @@ -105,13 +99,6 @@ LLTexParamGlobalColor::LLTexParamGlobalColor(const LLTexParamGlobalColor& pOther { } -//----------------------------------------------------------------------------- -// ~LLTexParamGlobalColor -//----------------------------------------------------------------------------- -LLTexParamGlobalColor::~LLTexParamGlobalColor() -{ -} - /*virtual*/ LLViewerVisualParam* LLTexParamGlobalColor::cloneParam(LLWearable* wearable) const { return new LLTexParamGlobalColor(*this); diff --git a/indra/llappearance/lltexglobalcolor.h b/indra/llappearance/lltexglobalcolor.h index 3b426053dee..f4c8f6cd3bd 100644 --- a/indra/llappearance/lltexglobalcolor.h +++ b/indra/llappearance/lltexglobalcolor.h @@ -38,7 +38,9 @@ class LLTexGlobalColor { public: LLTexGlobalColor( LLAvatarAppearance* appearance ); - ~LLTexGlobalColor(); + + // mParamColorList are LLViewerVisualParam's and get deleted with ~LLCharacter() + ~LLTexGlobalColor() = default; LLTexGlobalColorInfo* getInfo() const { return mInfo; } // This sets mInfo and calls initialization functions @@ -73,7 +75,7 @@ class LLTexParamGlobalColor : public LLTexLayerParamColor { public: LLTexParamGlobalColor(LLTexGlobalColor *tex_color); - virtual ~LLTexParamGlobalColor(); + virtual ~LLTexParamGlobalColor() = default; /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable) const; protected: LLTexParamGlobalColor(const LLTexParamGlobalColor& pOther); diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index 4d073b85c50..eb57c2990ce 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -99,10 +99,6 @@ LLTexLayerSetBuffer::LLTexLayerSetBuffer(LLTexLayerSet* const owner) : { } -LLTexLayerSetBuffer::~LLTexLayerSetBuffer() -{ -} - void LLTexLayerSetBuffer::pushProjection() const { gGL.matrixMode(LLRender::MM_PROJECTION); @@ -1727,10 +1723,6 @@ LLTexLayerTemplate::LLTexLayerTemplate(const LLTexLayerTemplate &layer) : { } -LLTexLayerTemplate::~LLTexLayerTemplate() -{ -} - //----------------------------------------------------------------------------- // setInfo //----------------------------------------------------------------------------- diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h index b7dda4d121b..5b2310b85e1 100644 --- a/indra/llappearance/lltexlayer.h +++ b/indra/llappearance/lltexlayer.h @@ -63,7 +63,7 @@ class LLTexLayerInterface LLTexLayerInterface(LLTexLayerSet* const layer_set); LLTexLayerInterface(const LLTexLayerInterface &layer, LLWearable *wearable); - virtual ~LLTexLayerInterface() {} + virtual ~LLTexLayerInterface() = default; virtual BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target) = 0; virtual void deleteCaches() = 0; @@ -120,7 +120,7 @@ class LLTexLayerTemplate : public LLTexLayerInterface public: LLTexLayerTemplate(LLTexLayerSet* const layer_set, LLAvatarAppearance* const appearance); LLTexLayerTemplate(const LLTexLayerTemplate &layer); - /*virtual*/ ~LLTexLayerTemplate(); + /*virtual*/ ~LLTexLayerTemplate() = default; /*virtual*/ BOOL render(S32 x, S32 y, S32 width, S32 height, LLRenderTarget* bound_target); /*virtual*/ BOOL setInfo(const LLTexLayerInfo *info, LLWearable* wearable); // This sets mInfo and calls initialization functions /*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer @@ -270,7 +270,7 @@ class LLTexLayerSetBuffer : public virtual LLRefCount public: LLTexLayerSetBuffer(LLTexLayerSet* const owner); - virtual ~LLTexLayerSetBuffer(); + virtual ~LLTexLayerSetBuffer() = default; protected: void pushProjection() const; diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp index ff682d69069..2b010cfc94c 100644 --- a/indra/llappearance/lltexlayerparams.cpp +++ b/indra/llappearance/lltexlayerparams.cpp @@ -439,10 +439,6 @@ LLTexLayerParamColor::LLTexLayerParamColor(const LLTexLayerParamColor& pOther) { } -LLTexLayerParamColor::~LLTexLayerParamColor() -{ -} - /*virtual*/ LLViewerVisualParam* LLTexLayerParamColor::cloneParam(LLWearable* wearable) const { return new LLTexLayerParamColor(*this); diff --git a/indra/llappearance/lltexlayerparams.h b/indra/llappearance/lltexlayerparams.h index 0cb2dedbff8..d0eef8121a8 100644 --- a/indra/llappearance/lltexlayerparams.h +++ b/indra/llappearance/lltexlayerparams.h @@ -127,7 +127,7 @@ class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo friend class LLTexLayerParamAlpha; public: LLTexLayerParamAlphaInfo(); - /*virtual*/ ~LLTexLayerParamAlphaInfo() {}; + /*virtual*/ ~LLTexLayerParamAlphaInfo() = default; /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); @@ -171,7 +171,7 @@ class LLTexLayerParamColor : public LLTexLayerParam ll_aligned_free_16(ptr); } - /* virtual */ ~LLTexLayerParamColor(); + /* virtual */ ~LLTexLayerParamColor() = default; /*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const; @@ -207,7 +207,7 @@ class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo public: LLTexLayerParamColorInfo(); - virtual ~LLTexLayerParamColorInfo() {}; + virtual ~LLTexLayerParamColorInfo() = default; BOOL parseXml( LLXmlTreeNode* node ); LLTexLayerParamColor::EColorOperation getOperation() const { return mOperation; } private: diff --git a/indra/llappearance/lltexturemanagerbridge.h b/indra/llappearance/lltexturemanagerbridge.h index 101704b1627..db55e9e34e0 100644 --- a/indra/llappearance/lltexturemanagerbridge.h +++ b/indra/llappearance/lltexturemanagerbridge.h @@ -35,7 +35,7 @@ class LLTextureManagerBridge { public: - virtual ~LLTextureManagerBridge() {} + virtual ~LLTextureManagerBridge() = default; virtual LLPointer<LLGLTexture> getLocalTexture(BOOL usemipmaps = TRUE, BOOL generate_gl_tex = TRUE) = 0; virtual LLPointer<LLGLTexture> getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex = TRUE) = 0; diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp index af8394b60ce..9c7ac671028 100644 --- a/indra/llappearance/llviewervisualparam.cpp +++ b/indra/llappearance/llviewervisualparam.cpp @@ -50,10 +50,6 @@ LLViewerVisualParamInfo::LLViewerVisualParamInfo() { } -LLViewerVisualParamInfo::~LLViewerVisualParamInfo() -{ -} - //----------------------------------------------------------------------------- // parseXml() //----------------------------------------------------------------------------- @@ -135,13 +131,6 @@ LLViewerVisualParam::LLViewerVisualParam(const LLViewerVisualParam& pOther) { } -//----------------------------------------------------------------------------- -// ~LLViewerVisualParam() -//----------------------------------------------------------------------------- -LLViewerVisualParam::~LLViewerVisualParam() -{ -} - //----------------------------------------------------------------------------- // setInfo() //----------------------------------------------------------------------------- diff --git a/indra/llappearance/llviewervisualparam.h b/indra/llappearance/llviewervisualparam.h index 1a710c0ca69..4140772a272 100644 --- a/indra/llappearance/llviewervisualparam.h +++ b/indra/llappearance/llviewervisualparam.h @@ -41,7 +41,7 @@ class LLViewerVisualParamInfo : public LLVisualParamInfo friend class LLViewerVisualParam; public: LLViewerVisualParamInfo(); - /*virtual*/ ~LLViewerVisualParamInfo(); + /*virtual*/ ~LLViewerVisualParamInfo() = default; /*virtual*/ BOOL parseXml(LLXmlTreeNode* node); @@ -70,7 +70,7 @@ class LLViewerVisualParam : public LLVisualParam { public: LLViewerVisualParam(); - virtual ~LLViewerVisualParam(); + virtual ~LLViewerVisualParam() = default; // Special: These functions are overridden by child classes LLViewerVisualParamInfo *getInfo() const { return (LLViewerVisualParamInfo*)mInfo; }; diff --git a/indra/llappearance/llwearabledata.cpp b/indra/llappearance/llwearabledata.cpp index 66417ce469c..d31826c4bd7 100644 --- a/indra/llappearance/llwearabledata.cpp +++ b/indra/llappearance/llwearabledata.cpp @@ -38,11 +38,6 @@ LLWearableData::LLWearableData() : { } -// virtual -LLWearableData::~LLWearableData() -{ -} - using namespace LLAvatarAppearanceDefines; LLWearable* LLWearableData::getWearable(const LLWearableType::EType type, U32 index) diff --git a/indra/llappearance/llwearabledata.h b/indra/llappearance/llwearabledata.h index cb274ca5245..ba1b0753ed9 100644 --- a/indra/llappearance/llwearabledata.h +++ b/indra/llappearance/llwearabledata.h @@ -43,7 +43,7 @@ class LLWearableData //-------------------------------------------------------------------- public: LLWearableData(); - virtual ~LLWearableData(); + virtual ~LLWearableData() = default; void setAvatarAppearance(LLAvatarAppearance* appearance) { mAvatarAppearance = appearance; } -- GitLab