From 7cbc4eeb492260a7c9f1aa703234d4cc9e742e02 Mon Sep 17 00:00:00 2001 From: Thunderforge Date: Sun, 1 Jul 2018 19:17:50 -0500 Subject: [PATCH] Adding missing override keywords Prevents compiler warnings such as this: ``` /Users/Will/CLionProjects/OpenMW/apps/openmw/mwgui/windowbase.hpp:65:22: warning: 'onOpen' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] virtual void onOpen(); ^ /Users/Will/CLionProjects/OpenMW/apps/openmw/mwgui/windowbase.hpp:38:22: note: overridden virtual function is here virtual void onOpen() {} ^ ``` --- apps/openmw/mwgui/messagebox.hpp | 2 +- apps/openmw/mwgui/windowbase.hpp | 8 ++++---- apps/openmw/mwworld/worldimp.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/openmw/mwgui/messagebox.hpp b/apps/openmw/mwgui/messagebox.hpp index e0bcbe667..156a17e67 100644 --- a/apps/openmw/mwgui/messagebox.hpp +++ b/apps/openmw/mwgui/messagebox.hpp @@ -81,7 +81,7 @@ namespace MWGui MyGUI::Widget* getDefaultKeyFocus() override; - virtual bool exit() { return false; } + virtual bool exit() override { return false; } bool mMarkedToDelete; diff --git a/apps/openmw/mwgui/windowbase.hpp b/apps/openmw/mwgui/windowbase.hpp index 56901c95a..fde1f2ac9 100644 --- a/apps/openmw/mwgui/windowbase.hpp +++ b/apps/openmw/mwgui/windowbase.hpp @@ -56,15 +56,15 @@ namespace MWGui /* - * "Modal" windows cause the rest of the interface to be unaccessible while they are visible + * "Modal" windows cause the rest of the interface to be inaccessible while they are visible */ class WindowModal : public WindowBase { public: WindowModal(const std::string& parLayout); - virtual void onOpen(); - virtual void onClose(); - virtual bool exit() {return true;} + virtual void onOpen() override; + virtual void onClose() override; + virtual bool exit() override {return true;} }; /// A window that cannot be the target of a drag&drop action. diff --git a/apps/openmw/mwworld/worldimp.hpp b/apps/openmw/mwworld/worldimp.hpp index 29bc4692c..015a8b31b 100644 --- a/apps/openmw/mwworld/worldimp.hpp +++ b/apps/openmw/mwworld/worldimp.hpp @@ -608,7 +608,7 @@ namespace MWWorld void launchProjectile (MWWorld::Ptr actor, MWWorld::ConstPtr projectile, const osg::Vec3f& worldPos, const osg::Quat& orient, MWWorld::Ptr bow, float speed, float attackStrength) override; - void applyLoopingParticles(const MWWorld::Ptr& ptr); + void applyLoopingParticles(const MWWorld::Ptr& ptr) override; const std::vector& getContentFiles() const override; void breakInvisibility (const MWWorld::Ptr& actor) override;