From b303f6e6efeffc839cfdb99a6a7c48c7b5c15605 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 14 Sep 2019 08:41:50 -0400
Subject: [PATCH] Give the optimizer even more hand holding on virtuals

---
 indra/llappearance/lldriverparam.h            |   6 +-
 indra/llappearance/llpolymorph.h              |   4 +-
 indra/llappearance/llpolyskeletaldistortion.h |   4 +-
 indra/llappearance/lltexglobalcolor.h         |   2 +-
 indra/llappearance/lltexlayer.h               |   8 +-
 indra/llappearance/lltexlayerparams.cpp       |   4 -
 indra/llappearance/lltexlayerparams.h         |  28 ++---
 indra/llappearance/llviewervisualparam.cpp    |  11 --
 indra/llappearance/llviewervisualparam.h      |   4 +-
 indra/llcommon/lldictionary.h                 |   2 +-
 indra/llmath/xform.h                          |   2 +-
 indra/llprimitive/llprimitive.h               |  10 +-
 indra/newview/llviewerobject.h                |  10 +-
 indra/newview/llviewertexlayer.h              |   4 +-
 indra/newview/llvoavatar.cpp                  |   5 -
 indra/newview/llvoavatar.h                    | 102 +++++++++---------
 16 files changed, 94 insertions(+), 112 deletions(-)

diff --git a/indra/llappearance/lldriverparam.h b/indra/llappearance/lldriverparam.h
index 3c0c60cadd..c0575c7966 100644
--- a/indra/llappearance/lldriverparam.h
+++ b/indra/llappearance/lldriverparam.h
@@ -58,12 +58,12 @@ struct LLDrivenEntry
 
 //-----------------------------------------------------------------------------
 
-class LLDriverParamInfo : public LLViewerVisualParamInfo
+class LLDriverParamInfo final : public LLViewerVisualParamInfo
 {
 	friend class LLDriverParam;
 public:
 	LLDriverParamInfo();
-	/*virtual*/ ~LLDriverParamInfo() {};
+	/*virtual*/ ~LLDriverParamInfo() = default;
 	
 	/*virtual*/ BOOL parseXml(LLXmlTreeNode* node) override;
 
@@ -78,7 +78,7 @@ protected:
 //-----------------------------------------------------------------------------
 
 LL_ALIGN_PREFIX(16)
-class LLDriverParam : public LLViewerVisualParam
+class LLDriverParam final : public LLViewerVisualParam
 {
 private:
 	// Hide the default constructor.  Force construction with LLAvatarAppearance.
diff --git a/indra/llappearance/llpolymorph.h b/indra/llappearance/llpolymorph.h
index 407f945873..54fa1b408f 100644
--- a/indra/llappearance/llpolymorph.h
+++ b/indra/llappearance/llpolymorph.h
@@ -129,7 +129,7 @@ struct LLPolyVolumeMorph
 // LLPolyMorphTargetInfo
 // Shared information for LLPolyMorphTargets
 //-----------------------------------------------------------------------------
-class LLPolyMorphTargetInfo : public LLViewerVisualParamInfo
+class LLPolyMorphTargetInfo final : public LLViewerVisualParamInfo
 {
 	friend class LLPolyMorphTarget;
 public:
@@ -151,7 +151,7 @@ protected:
 // These morph targets must be topologically consistent with a given Polymesh
 // (share face sets)
 //-----------------------------------------------------------------------------
-class LLPolyMorphTarget : public LLViewerVisualParam
+class LLPolyMorphTarget final : public LLViewerVisualParam
 {
 public:
 	LLPolyMorphTarget(LLPolyMesh *poly_mesh);
diff --git a/indra/llappearance/llpolyskeletaldistortion.h b/indra/llappearance/llpolyskeletaldistortion.h
index 7d612a4aba..66d591eb90 100644
--- a/indra/llappearance/llpolyskeletaldistortion.h
+++ b/indra/llappearance/llpolyskeletaldistortion.h
@@ -56,7 +56,7 @@ struct LLPolySkeletalBoneInfo
 	BOOL mHasPositionDeformation;
 };
 
-class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
+class LLPolySkeletalDistortionInfo final : public LLViewerVisualParamInfo
 {
 	friend class LLPolySkeletalDistortion;
 public:
@@ -76,7 +76,7 @@ protected:
 // A set of joint scale data for deforming the avatar mesh
 //-----------------------------------------------------------------------------
 LL_ALIGN_PREFIX(16)
-class LLPolySkeletalDistortion : public LLViewerVisualParam
+class LLPolySkeletalDistortion final : public LLViewerVisualParam
 {
 public:
 	void* operator new(size_t size)
diff --git a/indra/llappearance/lltexglobalcolor.h b/indra/llappearance/lltexglobalcolor.h
index 6fc407d2d3..6e4f7da37e 100644
--- a/indra/llappearance/lltexglobalcolor.h
+++ b/indra/llappearance/lltexglobalcolor.h
@@ -68,7 +68,7 @@ private:
 	std::string				mName;
 };
 
-class LLTexParamGlobalColor : public LLTexLayerParamColor
+class LLTexParamGlobalColor final : public LLTexLayerParamColor
 {
 public:
 	LLTexParamGlobalColor(LLTexGlobalColor *tex_color);
diff --git a/indra/llappearance/lltexlayer.h b/indra/llappearance/lltexlayer.h
index 5adcc937d0..1331ffd2c6 100644
--- a/indra/llappearance/lltexlayer.h
+++ b/indra/llappearance/lltexlayer.h
@@ -63,7 +63,7 @@ public:
 
 	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) = 0;
 	virtual void			deleteCaches() = 0;
@@ -115,7 +115,7 @@ protected:
 //
 // Only exists for llvoavatarself.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLTexLayerTemplate : public LLTexLayerInterface
+class LLTexLayerTemplate final : public LLTexLayerInterface
 {
 public:
 	LLTexLayerTemplate(LLTexLayerSet* const layer_set, LLAvatarAppearance* const appearance);
@@ -143,7 +143,7 @@ private:
 //
 // A single texture layer.  Only exists for llvoavatarself.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLTexLayer : public LLTexLayerInterface
+class LLTexLayer final : public LLTexLayerInterface
 {
 public:
 	LLTexLayer(LLTexLayerSet* const layer_set);
@@ -291,7 +291,7 @@ protected:
 // LLTexLayerStaticImageList
 //
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLTexLayerStaticImageList : public LLSingleton<LLTexLayerStaticImageList>
+class LLTexLayerStaticImageList final : public LLSingleton<LLTexLayerStaticImageList>
 {
 	LLSINGLETON(LLTexLayerStaticImageList);
 	~LLTexLayerStaticImageList();
diff --git a/indra/llappearance/lltexlayerparams.cpp b/indra/llappearance/lltexlayerparams.cpp
index 03db090a0a..f0bc5e696a 100644
--- a/indra/llappearance/lltexlayerparams.cpp
+++ b/indra/llappearance/lltexlayerparams.cpp
@@ -440,10 +440,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 5075c1a05a..15ca7e2a5a 100644
--- a/indra/llappearance/lltexlayerparams.h
+++ b/indra/llappearance/lltexlayerparams.h
@@ -63,7 +63,7 @@ protected:
 // 
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL_ALIGN_PREFIX(16)
-class LLTexLayerParamAlpha : public LLTexLayerParam
+class LLTexLayerParamAlpha final : public LLTexLayerParam
 {
 public:
 	LLTexLayerParamAlpha( LLTexLayerInterface* layer );
@@ -123,7 +123,7 @@ public:
 	typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t;
 	static param_alpha_ptr_list_t sInstances;
 } LL_ALIGN_POSTFIX(16);
-class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo
+class LLTexLayerParamAlphaInfo final : public LLViewerVisualParamInfo
 {
 	friend class LLTexLayerParamAlpha;
 public:
@@ -172,26 +172,26 @@ public:
 		ll_aligned_free_16(ptr);
 	}
 
-	/* virtual */ ~LLTexLayerParamColor();
+	/* virtual */ ~LLTexLayerParamColor() = default;
 
 	/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = nullptr) const override;
 
 	// LLVisualParam Virtual functions
 	///*virtual*/ BOOL			parseData(LLXmlTreeNode* node);
-	/*virtual*/ void			apply( ESex avatar_sex ) override {}
-	/*virtual*/ void			setWeight(F32 weight, BOOL upload_bake) override;
-	/*virtual*/ void			setAnimationTarget(F32 target_value, BOOL upload_bake) override;
-	/*virtual*/ void			animate(F32 delta, BOOL upload_bake) override;
+	/*virtual*/ void			apply( ESex avatar_sex ) final override {}
+	/*virtual*/ void			setWeight(F32 weight, BOOL upload_bake) final override;
+	/*virtual*/ void			setAnimationTarget(F32 target_value, BOOL upload_bake) final override;
+	/*virtual*/ void			animate(F32 delta, BOOL upload_bake) final override;
 
 
 	// LLViewerVisualParam Virtual functions
-	/*virtual*/ F32					getTotalDistortion() override { return 1.f; }
-	/*virtual*/ const LLVector4a&	getAvgDistortion() override { return mAvgDistortionVec; }
-	/*virtual*/ F32					getMaxDistortion() override { return 3.f; }
-	/*virtual*/ LLVector4a			getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) override { return LLVector4a(1.f, 1.f, 1.f); }
-	/*virtual*/ const LLVector4a*	getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) override
+	/*virtual*/ F32					getTotalDistortion() final override { return 1.f; }
+	/*virtual*/ const LLVector4a&	getAvgDistortion() final override { return mAvgDistortionVec; }
+	/*virtual*/ F32					getMaxDistortion() final override { return 3.f; }
+	/*virtual*/ LLVector4a			getVertexDistortion(S32 index, LLPolyMesh *poly_mesh) final override { return LLVector4a(1.f, 1.f, 1.f); }
+	/*virtual*/ const LLVector4a*	getFirstDistortion(U32 *index, LLPolyMesh **poly_mesh) final override
 	{ index = nullptr; poly_mesh = nullptr; return &mAvgDistortionVec;};
-	/*virtual*/ const LLVector4a*	getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) override
+	/*virtual*/ const LLVector4a*	getNextDistortion(U32 *index, LLPolyMesh **poly_mesh) final override
 	{ index = nullptr; poly_mesh = nullptr; return nullptr;};
 
 	// New functions
@@ -204,7 +204,7 @@ private:
 	LL_ALIGN_16(LLVector4a				mAvgDistortionVec);
 } LL_ALIGN_POSTFIX(16);
 
-class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
+class LLTexLayerParamColorInfo final : public LLViewerVisualParamInfo
 {
 	friend class LLTexLayerParamColor;
 
diff --git a/indra/llappearance/llviewervisualparam.cpp b/indra/llappearance/llviewervisualparam.cpp
index 693bc577d1..f575501ac8 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 d5832f7c2e..4d8b79bede 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) override;
 
@@ -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/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h
index 4d6df6cefc..b8df25a07d 100644
--- a/indra/llcommon/lldictionary.h
+++ b/indra/llcommon/lldictionary.h
@@ -35,7 +35,7 @@
 struct LL_COMMON_API LLDictionaryEntry
 {
 	LLDictionaryEntry(const std::string &name);
-	virtual ~LLDictionaryEntry() {}
+	virtual ~LLDictionaryEntry() = default;
 	const std::string mName;
 	std::string mNameCapitalized;
 };
diff --git a/indra/llmath/xform.h b/indra/llmath/xform.h
index cb7c67f0b5..48d100f874 100644
--- a/indra/llmath/xform.h
+++ b/indra/llmath/xform.h
@@ -137,7 +137,7 @@ public:
 class LLXformMatrix : public LLXform
 {
 public:
-	LLXformMatrix() : LLXform() {};
+	LLXformMatrix() = default;
 	virtual ~LLXformMatrix() = default;
 
 	const LLMatrix4&    getWorldMatrix() const      { return mWorldMatrix; }
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index f8013c0518..742922dd22 100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -133,7 +133,7 @@ extern const F32 LIGHT_MIN_CUTOFF;
 extern const F32 LIGHT_DEFAULT_CUTOFF;
 extern const F32 LIGHT_MAX_CUTOFF;
 
-class LLLightParams : public LLNetworkData
+class LLLightParams final : public LLNetworkData
 {
 protected:
 	LLColor4 mColor; // alpha = intensity
@@ -208,7 +208,7 @@ extern const BOOL FLEXIBLE_OBJECT_DEFAULT_USING_COLLISION_SPHERE;
 extern const BOOL FLEXIBLE_OBJECT_DEFAULT_RENDERING_COLLISION_SPHERE;
 
 
-class LLFlexibleObjectData : public LLNetworkData
+class LLFlexibleObjectData final : public LLNetworkData
 {
 protected:
 	S32			mSimulateLOD;		// 2^n = number of simulated sections
@@ -248,7 +248,7 @@ public:
 
 
 
-class LLSculptParams : public LLNetworkData
+class LLSculptParams final : public LLNetworkData
 {
 protected:
 	LLUUID mSculptTexture;
@@ -269,7 +269,7 @@ public:
 	U8 getSculptType() const                { return mSculptType; }
 };
 
-class LLLightImageParams : public LLNetworkData
+class LLLightImageParams final : public LLNetworkData
 {
 protected:
 	LLUUID mLightTexture;
@@ -293,7 +293,7 @@ public:
 	
 };
 
-class LLExtendedMeshParams : public LLNetworkData
+class LLExtendedMeshParams final : public LLNetworkData
 {
 protected:
 	U32 mFlags;
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index f71610fc0f..09f7ba3255 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -321,7 +321,7 @@ public:
 	inline void setRotation(const LLQuaternion& quat, BOOL damped = FALSE);
 
 	/*virtual*/	void	setNumTEs(const U8 num_tes) override;
-	/*virtual*/	void	setTE(const U8 te, const LLTextureEntry &texture_entry) override;
+	/*virtual*/	void	setTE(const U8 te, const LLTextureEntry &texture_entry) final override;
 	/*virtual*/ S32		setTETexture(const U8 te, const LLUUID &uuid) override;
 	/*virtual*/ S32		setTENormalMap(const U8 te, const LLUUID &uuid);
 	/*virtual*/ S32		setTESpecularMap(const U8 te, const LLUUID &uuid);
@@ -333,10 +333,10 @@ public:
 	/*virtual*/ S32		setTEScale(const U8 te, const F32 s, const F32 t) override;
 	/*virtual*/ S32		setTEScaleS(const U8 te, const F32 s) override;
 	/*virtual*/ S32		setTEScaleT(const U8 te, const F32 t) override;
-	/*virtual*/ S32		setTEOffset(const U8 te, const F32 s, const F32 t) override;
-	/*virtual*/ S32		setTEOffsetS(const U8 te, const F32 s) override;
-	/*virtual*/ S32		setTEOffsetT(const U8 te, const F32 t) override;
-	/*virtual*/ S32		setTERotation(const U8 te, const F32 r) override;
+	/*virtual*/ S32		setTEOffset(const U8 te, const F32 s, const F32 t) final override;
+	/*virtual*/ S32		setTEOffsetS(const U8 te, const F32 s) final override;
+	/*virtual*/ S32		setTEOffsetT(const U8 te, const F32 t) final override;
+	/*virtual*/ S32		setTERotation(const U8 te, const F32 r) final override;
 	/*virtual*/	S32		setTEBumpmap(const U8 te, const U8 bump ) override;
 	/*virtual*/	S32		setTETexGen(const U8 te, const U8 texgen ) override;
 	/*virtual*/	S32		setTEMediaTexGen(const U8 te, const U8 media ) override; // *FIXME: this confusingly acts upon a superset of setTETexGen's flags without absorbing its semantics
diff --git a/indra/newview/llviewertexlayer.h b/indra/newview/llviewertexlayer.h
index 51bc7c972b..93dd99c5fd 100644
--- a/indra/newview/llviewertexlayer.h
+++ b/indra/newview/llviewertexlayer.h
@@ -40,7 +40,7 @@ class LLViewerTexLayerSetBuffer;
 // An ordered set of texture layers that gets composited into a single texture.
 // Only exists for llavatarappearanceself.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLViewerTexLayerSet : public LLTexLayerSet
+class LLViewerTexLayerSet final : public LLTexLayerSet
 {
 public:
 	LLViewerTexLayerSet(LLAvatarAppearance* const appearance);
@@ -71,7 +71,7 @@ private:
 //
 // The composite image that a LLViewerTexLayerSet writes to.  Each LLViewerTexLayerSet has one.
 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-class LLViewerTexLayerSetBuffer : public LLTexLayerSetBuffer, public LLViewerDynamicTexture
+class LLViewerTexLayerSetBuffer final : public LLTexLayerSetBuffer, public LLViewerDynamicTexture
 {
 	LOG_CLASS(LLViewerTexLayerSetBuffer);
 
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 07dc0e472d..39e3ae98b8 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -1901,11 +1901,6 @@ LLViewerObject* LLVOAvatar::lineSegmentIntersectRiggedAttachments(const LLVector
 }
 
 
-LLVOAvatar* LLVOAvatar::asAvatar()
-{
-	return this;
-}
-
 //-----------------------------------------------------------------------------
 // LLVOAvatar::startDefaultMotions()
 //-----------------------------------------------------------------------------
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index d9a1b353f6..d5a2531f2d 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -127,19 +127,21 @@ protected:
 	// LLViewerObject interface and related
 	//--------------------------------------------------------------------
 public:
-	/*virtual*/ void			updateGL() override;
-	/*virtual*/ LLVOAvatar*		asAvatar() override;
+	/*virtual*/ void			updateGL() final override;
+	/*virtual*/ LLVOAvatar*		asAvatar() final override 
+	{
+		return this;
+	}
 	U32    	 	 	processUpdateMessage(LLMessageSystem *mesgsys,
 													 void **user_data,
 													 U32 block_num,
 													 const EObjectUpdateType update_type,
-													 LLDataPacker *dp) override;
+													 LLDataPacker *dp) final override;
 	void   	 	 	idleUpdate(LLAgent &agent, const F64 &time) override;
-	/*virtual*/ BOOL   	 	 	updateLOD() override;
+	/*virtual*/ BOOL   	 	 	updateLOD() final override;
 	BOOL  	 	 	 	 	updateJointLODs();
 	void					updateLODRiggedAttachments( void );
-	void					updateSoftwareSkinnedVertices(const LLMeshSkinInfo* skin, const LLVector4a* weight, const LLVolumeFace& vol_face, LLVertexBuffer *buffer);
-	/*virtual*/ BOOL   	 	 	isActive() const override; // Whether this object needs to do an idleUpdate.
+	/*virtual*/ BOOL   	 	 	isActive() const final override; // Whether this object needs to do an idleUpdate.
 	S32Bytes				totalTextureMemForUUIDS(std::set<LLUUID>& ids);
 	bool 						allTexturesCompletelyDownloaded(std::set<LLUUID>& ids) const;
 	bool 						allLocalTexturesCompletelyDownloaded() const;
@@ -151,18 +153,18 @@ public:
 	void 						collectBakedTextureUUIDs(std::set<LLUUID>& ids) const;
 	void 						collectTextureUUIDs(std::set<LLUUID>& ids);
 	void						releaseOldTextures();
-	/*virtual*/ void   	 	 	updateTextures() override;
+	/*virtual*/ void   	 	 	updateTextures() final override;
 	LLViewerFetchedTexture*		getBakedTextureImage(const U8 te, const LLUUID& uuid);
-	/*virtual*/ S32    	 	 	setTETexture(const U8 te, const LLUUID& uuid) override; // If setting a baked texture, need to request it from a non-local sim.
-	/*virtual*/ void   	 	 	onShift(const LLVector4a& shift_vector) override;
-	/*virtual*/ U32    	 	 	getPartitionType() const override;
-	/*virtual*/ const  	 	 	LLVector3 getRenderPosition() const override;
-	/*virtual*/ void   	 	 	updateDrawable(BOOL force_damped) override;
-	/*virtual*/ LLDrawable* 	createDrawable(LLPipeline *pipeline) override;
-	/*virtual*/ BOOL   	 	 	updateGeometry(LLDrawable *drawable) override;
-	/*virtual*/ void   	 	 	setPixelAreaAndAngle(LLAgent &agent) override;
+	/*virtual*/ S32    	 	 	setTETexture(const U8 te, const LLUUID& uuid) final override; // If setting a baked texture, need to request it from a non-local sim.
+	/*virtual*/ void   	 	 	onShift(const LLVector4a& shift_vector) final override;
+	/*virtual*/ U32    	 	 	getPartitionType() const final override;
+	/*virtual*/ const  	 	 	LLVector3 getRenderPosition() const final override;
+	/*virtual*/ void   	 	 	updateDrawable(BOOL force_damped) final override;
+	/*virtual*/ LLDrawable* 	createDrawable(LLPipeline *pipeline) final override;
+	/*virtual*/ BOOL   	 	 	updateGeometry(LLDrawable *drawable) final override;
+	/*virtual*/ void   	 	 	setPixelAreaAndAngle(LLAgent &agent) final override;
 	/*virtual*/ void   	 	 	updateRegion(LLViewerRegion *regionp) override;
-	/*virtual*/ void   	 	 	updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) override;
+	/*virtual*/ void   	 	 	updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax) final override;
 	void			   	 	 	calculateSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
 	/*virtual*/ BOOL   	 	 	lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end,
 												 S32 face = -1,                    // which face to check, -1 = ALL_SIDES
@@ -172,7 +174,7 @@ public:
 												 LLVector4a* intersection = nullptr,   // return the intersection point
 												 LLVector2* tex_coord = nullptr,      // return the texture coordinates of the intersection point
 												 LLVector4a* normal = nullptr,         // return the surface normal at the intersection point
-												 LLVector4a* tangent = nullptr) override;     // return the surface tangent at the intersection point
+												 LLVector4a* tangent = nullptr) final override;     // return the surface tangent at the intersection point
 	virtual LLViewerObject*	lineSegmentIntersectRiggedAttachments(
                                                  const LLVector4a& start, const LLVector4a& end,
 												 S32 face = -1,                    // which face to check, -1 = ALL_SIDES
@@ -188,14 +190,14 @@ public:
 	// LLCharacter interface and related
 	//--------------------------------------------------------------------
 public:
-	/*virtual*/ LLVector3    	getCharacterPosition() override;
-	/*virtual*/ LLQuaternion 	getCharacterRotation() override;
-	/*virtual*/ LLVector3    	getCharacterVelocity() override;
-	/*virtual*/ LLVector3    	getCharacterAngularVelocity() override;
+	/*virtual*/ LLVector3    	getCharacterPosition() final override;
+	/*virtual*/ LLQuaternion 	getCharacterRotation() final override;
+	/*virtual*/ LLVector3    	getCharacterVelocity() final override;
+	/*virtual*/ LLVector3    	getCharacterAngularVelocity() final override;
 
 	/*virtual*/ LLUUID			remapMotionID(const LLUUID& id);
-	/*virtual*/ BOOL			startMotion(const LLUUID& id, F32 time_offset = 0.f) override;
-	/*virtual*/ BOOL			stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE) override;
+	/*virtual*/ BOOL			startMotion(const LLUUID& id, F32 time_offset = 0.f) final override;
+	/*virtual*/ BOOL			stopMotion(const LLUUID& id, BOOL stop_immediate = FALSE) final override;
 	virtual bool			hasMotionFromSource(const LLUUID& source_id);
 	virtual void			stopMotionFromSource(const LLUUID& source_id);
 	void			requestStopMotion(LLMotion* motion) override;
@@ -220,20 +222,20 @@ public:
     void 					getAssociatedVolumes(std::vector<LLVOVolume*>& volumes);
 
     // virtual
-    void 					updateRiggingInfo() override;
+    void 					updateRiggingInfo() final override;
 	// This encodes mesh id and LOD, so we can see whether display is up-to-date.
 	size_t					mLastRiggingInfoKeyHash = 0;
 	
     std::set<LLUUID>		mActiveOverrideMeshes;
     void					onActiveOverrideMeshesChanged();
     
-	/*virtual*/ const LLUUID&	getID() const override;
-	/*virtual*/ void			addDebugText(const std::string& text) override;
-	/*virtual*/ F32				getTimeDilation() override;
-	/*virtual*/ void			getGround(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm) override;
-	/*virtual*/ F32				getPixelArea() const override;
-	/*virtual*/ LLVector3d		getPosGlobalFromAgent(const LLVector3 &position) override;
-	/*virtual*/ LLVector3		getPosAgentFromGlobal(const LLVector3d &position) override;
+	/*virtual*/ const LLUUID&	getID() const final override;
+	/*virtual*/ void			addDebugText(const std::string& text) final override;
+	/*virtual*/ F32				getTimeDilation() final override;
+	/*virtual*/ void			getGround(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm) final override;
+	/*virtual*/ F32				getPixelArea() const final override;
+	/*virtual*/ LLVector3d		getPosGlobalFromAgent(const LLVector3 &position) final override;
+	/*virtual*/ LLVector3		getPosAgentFromGlobal(const LLVector3d &position) final override;
 	void				updateVisualParams() override;
 
 /**                    Inherited
@@ -393,17 +395,17 @@ protected:
  **/
 
 protected:
-	/*virtual*/ LLAvatarJoint*	createAvatarJoint() override; // Returns LLViewerJoint
-	/*virtual*/ LLAvatarJoint*	createAvatarJoint(S32 joint_num) override; // Returns LLViewerJoint
-	/*virtual*/ LLAvatarJointMesh*	createAvatarJointMesh() override; // Returns LLViewerJointMesh
+	/*virtual*/ LLAvatarJoint*	createAvatarJoint() final override; // Returns LLViewerJoint
+	/*virtual*/ LLAvatarJoint*	createAvatarJoint(S32 joint_num) final override; // Returns LLViewerJoint
+	/*virtual*/ LLAvatarJointMesh*	createAvatarJointMesh() final override; // Returns LLViewerJointMesh
 public:
 	void				updateHeadOffset();
     void				debugBodySize() const;
 	void				postPelvisSetRecalc( void );
 
-	/*virtual*/ BOOL	loadSkeletonNode() override;
+	/*virtual*/ BOOL	loadSkeletonNode() final override;
     void                initAttachmentPoints(bool ignore_hud_joints = false);
-	/*virtual*/ void	buildCharacter() override;
+	/*virtual*/ void	buildCharacter() final override;
     void                resetVisualParams();
     void				resetSkeleton(bool reset_animations);
 
@@ -482,7 +484,7 @@ public:
 	// Morph masks
 	//--------------------------------------------------------------------
 public:
-	/*virtual*/ void	applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES) override;
+	/*virtual*/ void	applyMorphMask(U8* tex_data, S32 width, S32 height, S32 num_components, LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES) final override;
 	BOOL 		morphMaskNeedsUpdate(LLAvatarAppearanceDefines::EBakedTextureIndex index = LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
 
 	
@@ -490,7 +492,7 @@ public:
 	// Global colors
 	//--------------------------------------------------------------------
 public:
-	/*virtual*/void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake) override;
+	/*virtual*/void onGlobalColorChanged(const LLTexGlobalColor* global_color, BOOL upload_bake) final override;
 
 	//--------------------------------------------------------------------
 	// Visibility
@@ -602,7 +604,7 @@ public:
 	// Baked textures
 	//--------------------------------------------------------------------
 public:
-	/*virtual*/ LLTexLayerSet*	createTexLayerSet() override; // Return LLViewerTexLayerSet
+	/*virtual*/ LLTexLayerSet*	createTexLayerSet() final override; // Return LLViewerTexLayerSet
 	void			releaseComponentTextures(); // ! BACKWARDS COMPATIBILITY !
 
 protected:
@@ -685,9 +687,9 @@ private:
 
 public:
 	void			debugColorizeSubMeshes(U32 i, const LLColor4& color);
-	void 	updateMeshTextures() override;
+	void 	updateMeshTextures() final override;
 	void 			updateSexDependentLayerSets(BOOL upload_bake);
-	void	dirtyMesh() override; // Dirty the avatar mesh
+	void	dirtyMesh() final override; // Dirty the avatar mesh
 	void 			updateMeshData();
 	void			updateMeshVisibility();
 	LLViewerTexture*		getBakedTexture(const U8 te);
@@ -696,7 +698,7 @@ protected:
 	void 			releaseMeshData();
 	virtual void restoreMeshData();
 private:
-	void	dirtyMesh(S32 priority) override; // Dirty the avatar mesh, with priority
+	void	dirtyMesh(S32 priority) final override; // Dirty the avatar mesh, with priority
 	LLViewerJoint*	getViewerJoint(S32 idx);
 	S32 			mDirtyMesh; // 0 -- not dirty, 1 -- morphed, 2 -- LOD
 	BOOL			mMeshTexturesDirty;
@@ -725,7 +727,7 @@ public:
     void            applyParsedAppearanceMessage(LLAppearanceMessageContents& contents, bool slam_params);
 	void 			hideSkirt();
 	void			startAppearanceAnimation();	
-	/*virtual*/ void bodySizeChanged() override;
+	/*virtual*/ void bodySizeChanged() final override;
 
 	//--------------------------------------------------------------------
 	// Appearance morphing
@@ -736,14 +738,14 @@ public:
 	// True if we are computing our appearance via local compositing
 	// instead of baked textures, as for example during wearable
 	// editing or when waiting for a subsequent server rebake.
-	/*virtual*/ BOOL	isUsingLocalAppearance() const override { return mUseLocalAppearance; }
+	/*virtual*/ BOOL	isUsingLocalAppearance() const final override { return mUseLocalAppearance; }
 
-	BOOL				isUsingServerBakes() const override;
+	BOOL				isUsingServerBakes() const final override;
 	void 				setIsUsingServerBakes(BOOL newval);
 
 	// True if we are currently in appearance editing mode. Often but
 	// not always the same as isUsingLocalAppearance().
-	/*virtual*/ BOOL	isEditingAppearance() const override { return mIsEditingAppearance; }
+	/*virtual*/ BOOL	isEditingAppearance() const final override { return mIsEditingAppearance; }
 
 	// FIXME review isUsingLocalAppearance uses, some should be isEditing instead.
 
@@ -783,7 +785,7 @@ public:
 	static bool		    getRiggedMeshID( LLViewerObject* pVO, LLUUID& mesh_id );
 	void				cleanupAttachedMesh( LLViewerObject* pVO );
 	static LLVOAvatar*  findAvatarFromAttachment(LLViewerObject* obj);
-	/*virtual*/ BOOL	isWearingWearableType(LLWearableType::EType type ) const override;
+	/*virtual*/ BOOL	isWearingWearableType(LLWearableType::EType type ) const final override;
 	LLViewerObject *	findAttachmentByID( const LLUUID & target_id ) const;
 	LLViewerJointAttachment* getTargetAttachmentPoint(LLViewerObject* viewer_object);
 
@@ -923,9 +925,9 @@ private:
  **/
 
 public:
-	/*virtual*/ BOOL 	setParent(LLViewerObject* parent) override;
-	/*virtual*/ void 	addChild(LLViewerObject *childp) override;
-	/*virtual*/ void 	removeChild(LLViewerObject *childp) override;
+	/*virtual*/ BOOL 	setParent(LLViewerObject* parent) final override;
+	/*virtual*/ void 	addChild(LLViewerObject *childp) final override;
+	/*virtual*/ void 	removeChild(LLViewerObject *childp) final override;
 
 	//--------------------------------------------------------------------
 	// Sitting
-- 
GitLab