From 6291fada360b8c7c779d1022d09f55c2343ede3b Mon Sep 17 00:00:00 2001 From: "auria.mg" Date: Fri, 18 May 2018 20:09:13 -0400 Subject: [PATCH] Fix more clang warnings --- src/guiengine/widgets/icon_button_widget.hpp | 2 +- src/karts/ghost_kart.hpp | 16 ++--- src/karts/kart.hpp | 64 ++++++++++---------- 3 files changed, 41 insertions(+), 41 deletions(-) diff --git a/src/guiengine/widgets/icon_button_widget.hpp b/src/guiengine/widgets/icon_button_widget.hpp index 9edc073f4..6cf292bc1 100644 --- a/src/guiengine/widgets/icon_button_widget.hpp +++ b/src/guiengine/widgets/icon_button_widget.hpp @@ -94,7 +94,7 @@ namespace GUIEngine virtual ~IconButtonWidget() {}; /** \brief Implement callback from base class Widget */ - virtual void add(); + virtual void add() OVERRIDE; /** * \brief Call this if scale mode is SCALE_MODE_KEEP_CUSTOM_ASPECT_RATIO. diff --git a/src/karts/ghost_kart.hpp b/src/karts/ghost_kart.hpp index 4cc368fcc..841c61a43 100644 --- a/src/karts/ghost_kart.hpp +++ b/src/karts/ghost_kart.hpp @@ -53,16 +53,16 @@ public: int position, float color_hue); virtual void update(int ticks) OVERRIDE; virtual void updateGraphics(float dt) OVERRIDE; - virtual void reset(); + virtual void reset() OVERRIDE; // ------------------------------------------------------------------------ /** No physics body for ghost kart, so nothing to adjust. */ - virtual void updateWeight() {}; + virtual void updateWeight() OVERRIDE {}; // ------------------------------------------------------------------------ /** No physics for ghost kart. */ - virtual void applyEngineForce (float force) {}; + virtual void applyEngineForce (float force) OVERRIDE {}; // ------------------------------------------------------------------------ // Not needed to create any physics for a ghost kart. - virtual void createPhysics() {}; + virtual void createPhysics() OVERRIDE {}; // ------------------------------------------------------------------------ const float getSuspensionLength(int index, int wheel) const { return m_all_physic_info[index].m_suspension_length[wheel]; } @@ -74,13 +74,13 @@ public: const ReplayBase::KartReplayEvent &kre); // ------------------------------------------------------------------------ /** Returns whether this kart is a ghost (replay) kart. */ - virtual bool isGhostKart() const { return true; } + virtual bool isGhostKart() const OVERRIDE { return true; } // ------------------------------------------------------------------------ /** Ghost can't be hunted. */ - virtual bool isInvulnerable() const { return true; } + virtual bool isInvulnerable() const OVERRIDE { return true; } // ------------------------------------------------------------------------ /** Returns the speed of the kart in meters/second. */ - virtual float getSpeed() const; + virtual float getSpeed() const OVERRIDE; // ------------------------------------------------------------------------ /** Returns the time at which the kart was at a given distance. @@ -88,7 +88,7 @@ public: float getTimeForDistance(float distance); // ------------------------------------------------------------------------ - virtual void kartIsInRestNow() {}; + virtual void kartIsInRestNow() OVERRIDE {}; // ------------------------------------------------------------------------ }; // GhostKart diff --git a/src/karts/kart.hpp b/src/karts/kart.hpp index de1b175a4..aba929634 100644 --- a/src/karts/kart.hpp +++ b/src/karts/kart.hpp @@ -267,21 +267,21 @@ public: PerPlayerDifficulty difficulty, std::shared_ptr ri); virtual ~Kart(); - virtual void init(RaceManager::KartType type); - virtual void kartIsInRestNow(); + virtual void init(RaceManager::KartType type) OVERRIDE; + virtual void kartIsInRestNow() OVERRIDE; virtual void updateGraphics(float dt) OVERRIDE; virtual void createPhysics (); - virtual void updateWeight (); - virtual float getSpeedForTurnRadius(float radius) const; + virtual void updateWeight () OVERRIDE; + virtual float getSpeedForTurnRadius(float radius) const OVERRIDE; virtual float getMaxSteerAngle(float speed) const; - virtual bool isInRest () const; + virtual bool isInRest () const OVERRIDE; virtual void applyEngineForce (float force); - virtual void flyUp(); - virtual void flyDown(); + virtual void flyUp() OVERRIDE; + virtual void flyDown() OVERRIDE; - virtual void startEngineSFX (); - virtual void adjustSpeed (float f); + virtual void startEngineSFX () OVERRIDE; + virtual void adjustSpeed (float f) OVERRIDE; virtual void increaseMaxSpeed(unsigned int category, float add_speed, float engine_force, int duration, int fade_out_time) OVERRIDE; @@ -289,36 +289,36 @@ public: float speed_boost, float engine_force, int duration, int fade_out_time) OVERRIDE; virtual void setSlowdown(unsigned int category, float max_speed_fraction, - int fade_in_time); - virtual int getSpeedIncreaseTicksLeft(unsigned int category) const; - virtual void setBoostAI (bool boosted); - virtual bool getBoostAI () const; - virtual void collectedItem(Item *item, int random_attachment); + int fade_in_time) OVERRIDE; + virtual int getSpeedIncreaseTicksLeft(unsigned int category) const OVERRIDE; + virtual void setBoostAI (bool boosted) OVERRIDE; + virtual bool getBoostAI () const OVERRIDE; + virtual void collectedItem(Item *item, int random_attachment) OVERRIDE; virtual float getStartupBoost() const; - virtual const Material *getMaterial() const; - virtual const Material *getLastMaterial() const; + virtual const Material *getMaterial() const OVERRIDE; + virtual const Material *getLastMaterial() const OVERRIDE; /** Returns the pitch of the terrain depending on the heading. */ - virtual float getTerrainPitch(float heading) const; + virtual float getTerrainPitch(float heading) const OVERRIDE; - virtual void reset (); + virtual void reset () OVERRIDE; virtual void handleZipper (const Material *m=NULL, - bool play_sound=false); - virtual void setSquash (float time, float slowdown); + bool play_sound=false) OVERRIDE; + virtual void setSquash (float time, float slowdown) OVERRIDE; - virtual void crashed (AbstractKart *k, bool update_attachments); - virtual void crashed (const Material *m, const Vec3 &normal); - virtual float getHoT () const; - virtual void update (int ticks); - virtual void finishedRace (float time, bool from_server=false); - virtual void setPosition (int p); - virtual void beep (); - virtual void showZipperFire (); - virtual float getCurrentMaxSpeed() const; + virtual void crashed (AbstractKart *k, bool update_attachments) OVERRIDE; + virtual void crashed (const Material *m, const Vec3 &normal) OVERRIDE; + virtual float getHoT () const OVERRIDE; + virtual void update (int ticks) OVERRIDE; + virtual void finishedRace (float time, bool from_server=false) OVERRIDE; + virtual void setPosition (int p) OVERRIDE; + virtual void beep () OVERRIDE; + virtual void showZipperFire () OVERRIDE; + virtual float getCurrentMaxSpeed() const OVERRIDE; - virtual bool playCustomSFX (unsigned int type); - virtual void setController(Controller *controller); - virtual void setXYZ(const Vec3& a); + virtual bool playCustomSFX (unsigned int type) OVERRIDE; + virtual void setController(Controller *controller) OVERRIDE; + virtual void setXYZ(const Vec3& a) OVERRIDE; // ======================================================================== // Powerup related functions.