From 9ffbf15ee124e207f274a84de0b2f2561be5a480 Mon Sep 17 00:00:00 2001 From: Ralph Sennhauser Date: Mon, 10 Nov 2025 11:20:56 +0100 Subject: [PATCH] Fix -Wunnecessary-virtual-specifier warnings Commit 3eee3a444dc6dbb70e425a4ae75b9211181c81c8 added final keyword to simulation classes but left virtual keywords in place. Signed-off-by: Ralph Sennhauser --- source/simulation2/components/CCmpObstruction.cpp | 2 +- source/simulation2/components/CCmpRallyPointRenderer.h | 2 +- source/simulation2/components/CCmpRangeManager.cpp | 2 +- source/simulation2/components/CCmpUnitMotion.h | 2 +- source/simulation2/components/CCmpVision.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/source/simulation2/components/CCmpObstruction.cpp b/source/simulation2/components/CCmpObstruction.cpp index 25518026e5..20d52b314a 100644 --- a/source/simulation2/components/CCmpObstruction.cpp +++ b/source/simulation2/components/CCmpObstruction.cpp @@ -521,7 +521,7 @@ public: return GetObstructionSquare(out, false); } - virtual bool GetObstructionSquare(ICmpObstructionManager::ObstructionSquare& out, bool previousPosition) const + bool GetObstructionSquare(ICmpObstructionManager::ObstructionSquare& out, bool previousPosition) const { CmpPtr cmpPosition(GetEntityHandle()); if (!cmpPosition) diff --git a/source/simulation2/components/CCmpRallyPointRenderer.h b/source/simulation2/components/CCmpRallyPointRenderer.h index d8894d20f9..fd14495a44 100644 --- a/source/simulation2/components/CCmpRallyPointRenderer.h +++ b/source/simulation2/components/CCmpRallyPointRenderer.h @@ -83,7 +83,7 @@ public: * Must be called whenever m_Displayed or the size of m_RallyPoints change, * to determine whether we need to respond to render messages. */ - virtual void UpdateMessageSubscriptions(); + void UpdateMessageSubscriptions(); void AddPosition_wrapper(const CFixedVector2D& pos) override; diff --git a/source/simulation2/components/CCmpRangeManager.cpp b/source/simulation2/components/CCmpRangeManager.cpp index ce921d5699..b83de1770b 100644 --- a/source/simulation2/components/CCmpRangeManager.cpp +++ b/source/simulation2/components/CCmpRangeManager.cpp @@ -1357,7 +1357,7 @@ public: } - virtual std::vector getParabolicRangeForm(CFixedVector3D pos, entity_pos_t maxRange, entity_pos_t cutoff, entity_pos_t minAngle, entity_pos_t maxAngle, int numberOfSteps) const + std::vector getParabolicRangeForm(CFixedVector3D pos, entity_pos_t maxRange, entity_pos_t cutoff, entity_pos_t minAngle, entity_pos_t maxAngle, int numberOfSteps) const { std::vector r; diff --git a/source/simulation2/components/CCmpUnitMotion.h b/source/simulation2/components/CCmpUnitMotion.h index de3b19175d..06f982042a 100644 --- a/source/simulation2/components/CCmpUnitMotion.h +++ b/source/simulation2/components/CCmpUnitMotion.h @@ -505,7 +505,7 @@ public: m_Acceleration = acceleration; } - virtual entity_pos_t GetWeight() const + entity_pos_t GetWeight() const { return m_TemplateWeight; } diff --git a/source/simulation2/components/CCmpVision.cpp b/source/simulation2/components/CCmpVision.cpp index 4a58a100ab..1bffc46f2b 100644 --- a/source/simulation2/components/CCmpVision.cpp +++ b/source/simulation2/components/CCmpVision.cpp @@ -115,7 +115,7 @@ public: } } - virtual void ReloadRange() + void ReloadRange() { CmpPtr cmpValueModificationManager(GetSystemEntity()); if (!cmpValueModificationManager)