From e659ad387284cedaae4d216877a277e909230fc5 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 14 Aug 2020 11:12:51 +0100 Subject: [PATCH] Destructor tweaks from some animation nodes --- simgear/scene/model/ConditionNode.hxx | 2 +- simgear/scene/model/SGMaterialAnimation.cxx | 4 +++- simgear/scene/model/SGMaterialAnimation.hxx | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/simgear/scene/model/ConditionNode.hxx b/simgear/scene/model/ConditionNode.hxx index f50ba99f..0b738c6d 100644 --- a/simgear/scene/model/ConditionNode.hxx +++ b/simgear/scene/model/ConditionNode.hxx @@ -34,7 +34,7 @@ public: ConditionNode(const ConditionNode& rhs, const osg::CopyOp& op = osg::CopyOp::SHALLOW_COPY); META_Node(simgear,ConditionNode); - ~ConditionNode(); + virtual ~ConditionNode(); const SGCondition* getCondition() const { return _condition.ptr(); } void setCondition(const SGCondition* condition) { _condition = condition; } diff --git a/simgear/scene/model/SGMaterialAnimation.cxx b/simgear/scene/model/SGMaterialAnimation.cxx index c380d9e6..73712325 100644 --- a/simgear/scene/model/SGMaterialAnimation.cxx +++ b/simgear/scene/model/SGMaterialAnimation.cxx @@ -357,7 +357,7 @@ public: _textureProp = modelRoot->getNode(node->getStringValue(), true); } - virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) + void operator()(osg::Node* node, osg::NodeVisitor* nv) override { osg::StateSet* stateSet = node->getStateSet(); if (stateSet) { @@ -425,6 +425,8 @@ SGMaterialAnimation::SGMaterialAnimation(simgear::SGTransientModelData &modelDat "no longer supported."); } +SGMaterialAnimation::~SGMaterialAnimation() = default; + osg::Group* SGMaterialAnimation::createAnimationGroup(osg::Group& parent) { diff --git a/simgear/scene/model/SGMaterialAnimation.hxx b/simgear/scene/model/SGMaterialAnimation.hxx index 60093102..b46a8599 100644 --- a/simgear/scene/model/SGMaterialAnimation.hxx +++ b/simgear/scene/model/SGMaterialAnimation.hxx @@ -22,6 +22,8 @@ class SGMaterialAnimation : public SGAnimation { public: SGMaterialAnimation(simgear::SGTransientModelData &modelData); + virtual ~SGMaterialAnimation(); + virtual osg::Group* createAnimationGroup(osg::Group& parent); virtual void install(osg::Node& node); static SGPropertyNode_ptr makeEffectProperties(const SGPropertyNode* animProp);