diff --git a/simgear/canvas/CanvasWindow.hxx b/simgear/canvas/CanvasWindow.hxx index db24bb9c..665a660a 100644 --- a/simgear/canvas/CanvasWindow.hxx +++ b/simgear/canvas/CanvasWindow.hxx @@ -68,8 +68,8 @@ namespace canvas Element* parent = 0 ); virtual ~Window(); - virtual void update(double delta_time_sec); - virtual void valueChanged(SGPropertyNode* node); + void update(double delta_time_sec) override; + void valueChanged(SGPropertyNode* node) override; const SGVec2 getPosition() const; const SGRect getScreenRegion() const; @@ -84,8 +84,8 @@ namespace canvas bool isResizable() const; bool isCapturingEvents() const; - virtual void setVisible(bool visible); - virtual bool isVisible() const; + void setVisible(bool visible) override; + bool isVisible() const override; /** * Moves window on top of all other windows with the same z-index. diff --git a/simgear/io/untar.cxx b/simgear/io/untar.cxx index 4d825efe..cc70c62f 100644 --- a/simgear/io/untar.cxx +++ b/simgear/io/untar.cxx @@ -48,6 +48,8 @@ namespace simgear assert(outer); } + virtual ~ArchiveExtractorPrivate() = default; + typedef enum { INVALID = 0, READING_HEADER, @@ -614,10 +616,7 @@ ArchiveExtractor::ArchiveExtractor(const SGPath& rootPath) : { } -ArchiveExtractor::~ArchiveExtractor() -{ - -} +ArchiveExtractor::~ArchiveExtractor() = default; void ArchiveExtractor::extractBytes(const uint8_t* bytes, size_t count) { diff --git a/simgear/io/untar.hxx b/simgear/io/untar.hxx index 1b3d9ccc..9760544c 100644 --- a/simgear/io/untar.hxx +++ b/simgear/io/untar.hxx @@ -34,7 +34,7 @@ class ArchiveExtractor { public: ArchiveExtractor(const SGPath& rootPath); - ~ArchiveExtractor(); + virtual ~ArchiveExtractor(); enum DetermineResult { diff --git a/simgear/scene/model/SGPickAnimation.cxx b/simgear/scene/model/SGPickAnimation.cxx index 9b9f5249..9f2a9eac 100644 --- a/simgear/scene/model/SGPickAnimation.cxx +++ b/simgear/scene/model/SGPickAnimation.cxx @@ -615,9 +615,8 @@ public: return false; } - virtual void buttonReleased( int keyModState, - const osgGA::GUIEventAdapter&, - const Info* ) + void buttonReleased( int keyModState, const osgGA::GUIEventAdapter&, + const Info* ) override { if (!_condition || _condition->test()) { @@ -641,8 +640,7 @@ public: return _dragDirection; } - virtual void mouseMoved( const osgGA::GUIEventAdapter& ea, - const Info* ) + void mouseMoved( const osgGA::GUIEventAdapter& ea, const Info* ) override { if (!_condition || _condition->test()) { _mousePos = eventToWindowCoords(ea); @@ -675,7 +673,7 @@ public: } } - virtual void update(double dt, int keyModState) + void update(double dt, int keyModState) override { if (_hasDragged) { return; @@ -688,8 +686,7 @@ public: } // of repeat iteration } - virtual bool hover( const osg::Vec2d& windowPos, - const Info& ) + bool hover( const osg::Vec2d& windowPos, const Info& ) override { if (!_condition || _condition->test()) { @@ -711,7 +708,7 @@ public: _cursorName = aName; } - virtual std::string getCursor() const + std::string getCursor() const override { return _cursorName; } private: