Fix clang warnings

This commit is contained in:
auria.mg 2018-05-18 19:58:51 -04:00
parent f2325e9140
commit 19fab0a4c1

View File

@ -324,57 +324,75 @@ public:
// Powerup related functions.
// ------------------------------------------------------------------------
/** Sets a new powerup. */
virtual void setPowerup (PowerupManager::PowerupType t, int n);
virtual void setPowerup (PowerupManager::PowerupType t, int n) OVERRIDE;
// ------------------------------------------------------------------------
/** Sets the last used powerup. */
virtual void setLastUsedPowerup (PowerupManager::PowerupType t);
// ------------------------------------------------------------------------
/** Returns the current powerup. */
virtual const Powerup* getPowerup() const { return m_powerup; }
virtual const Powerup* getPowerup() const OVERRIDE { return m_powerup; }
// ------------------------------------------------------------------------
/** Returns the current powerup. */
virtual Powerup* getPowerup() { return m_powerup; }
virtual Powerup* getPowerup() OVERRIDE { return m_powerup; }
// ------------------------------------------------------------------------
/** Returns the last used powerup. */
virtual PowerupManager::PowerupType getLastUsedPowerup() { return m_last_used_powerup; }
virtual PowerupManager::PowerupType getLastUsedPowerup() OVERRIDE
{
return m_last_used_powerup;
}
// ------------------------------------------------------------------------
/** Returns the number of powerups. */
virtual int getNumPowerup() const;
virtual int getNumPowerup() const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns a points to this kart's graphical effects. */
virtual KartGFX* getKartGFX() { return m_kart_gfx; }
virtual KartGFX* getKartGFX() OVERRIDE { return m_kart_gfx; }
// ------------------------------------------------------------------------
/** Returns the remaining collected energy. */
virtual float getEnergy () const { return m_collected_energy; }
virtual float getEnergy() const OVERRIDE
{
return m_collected_energy;
}
// ------------------------------------------------------------------------
/** Returns the current position of this kart in the race. */
virtual int getPosition () const { return m_race_position; }
virtual int getPosition() const OVERRIDE
{
return m_race_position;
}
// ------------------------------------------------------------------------
/** Returns the coordinates of the front of the kart. This is used for
* determining when the lap line is crossed. */
virtual const Vec3& getFrontXYZ() const { return m_xyz_front; }
virtual const Vec3& getFrontXYZ() const OVERRIDE { return m_xyz_front; }
// ------------------------------------------------------------------------
/** Returns the initial position of this kart. */
virtual int getInitialPosition () const { return m_initial_position; }
virtual int getInitialPosition () const OVERRIDE
{
return m_initial_position;
}
// ------------------------------------------------------------------------
/** Returns the finished time for a kart. */
virtual float getFinishTime () const { return m_finish_time; }
virtual float getFinishTime () const OVERRIDE
{
return m_finish_time;
}
// ------------------------------------------------------------------------
/** Returns true if this kart has finished the race. */
virtual bool hasFinishedRace () const { return m_finished_race; }
virtual bool hasFinishedRace () const OVERRIDE
{
return m_finished_race;
}
// ------------------------------------------------------------------------
/** Returns true if the kart has a plunger attached to its face. */
virtual int getBlockedByPlungerTicks() const
virtual int getBlockedByPlungerTicks() const OVERRIDE
{ return m_view_blocked_by_plunger; }
// ------------------------------------------------------------------------
/** Sets that the view is blocked by a plunger. The duration depends on
* the difficulty, see KartPorperties getPlungerInFaceTime. */
virtual void blockViewWithPlunger();
virtual void blockViewWithPlunger() OVERRIDE;
// -------------------------------------------------------------------------
/** Returns a bullet transform object located at the kart's position
and oriented in the direction the kart is going. Can be useful
e.g. to calculate the starting point and direction of projectiles. */
virtual btTransform getAlignedTransform(const float customPitch=-1);
virtual btTransform getAlignedTransform(const float customPitch=-1) OVERRIDE;
// -------------------------------------------------------------------------
/** Returns the color used for this kart. */
const irr::video::SColor &getColor() const;
@ -382,67 +400,67 @@ public:
/** Returns the time till full steering is reached for this kart.
* \param steer Current steer value (must be >=0), on which the time till
* full steer depends. */
virtual float getTimeFullSteer(float steer) const;
virtual float getTimeFullSteer(float steer) const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the maximum steering angle for this kart, which depends on the
* speed. */
virtual float getMaxSteerAngle () const
virtual float getMaxSteerAngle () const OVERRIDE
{ return getMaxSteerAngle(getSpeed()); }
// ------------------------------------------------------------------------
/** Returns the skidding object for this kart (which can be used to query
* skidding related values). */
virtual const Skidding *getSkidding() const { return m_skidding; }
virtual const Skidding *getSkidding() const OVERRIDE { return m_skidding; }
// ------------------------------------------------------------------------
/** Returns the skidding object for this kart (which can be used to query
* skidding related values) - non-const. */
virtual Skidding *getSkidding() { return m_skidding; }
virtual Skidding *getSkidding() OVERRIDE { return m_skidding; }
// ------------------------------------------------------------------------
virtual RaceManager::KartType getType() const { return m_type; }
// ------------------------------------------------------------------------
/** Returns the bullet vehicle which represents this kart. */
virtual btKart *getVehicle() const {return m_vehicle; }
virtual btKart *getVehicle() const OVERRIDE { return m_vehicle; }
// ------------------------------------------------------------------------
/** Returns the speed of the kart in meters/second. */
virtual float getSpeed() const {return m_speed; }
virtual float getSpeed() const OVERRIDE { return m_speed; }
// ------------------------------------------------------------------------
/** Returns the speed of the kart in meters/second. */
virtual float getSmoothedSpeed() const { return m_smoothed_speed; }
virtual float getSmoothedSpeed() const OVERRIDE { return m_smoothed_speed; }
// ------------------------------------------------------------------------
/** This is used on the client side only to set the speed of the kart
* from the server information. */
virtual void setSpeed(float s) {m_speed = s; }
virtual void setSpeed(float s) OVERRIDE { m_speed = s; }
// ------------------------------------------------------------------------
virtual btQuaternion getVisualRotation() const;
virtual btQuaternion getVisualRotation() const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the slipstream object of this kart. */
virtual const SlipStream* getSlipstream() const {return m_slipstream; }
virtual const SlipStream* getSlipstream() const OVERRIDE { return m_slipstream; }
// ------------------------------------------------------------------------
/** Returns the slipstream object of this kart. */
virtual SlipStream* getSlipstream() {return m_slipstream; }
virtual SlipStream* getSlipstream() OVERRIDE {return m_slipstream; }
// ------------------------------------------------------------------------
/** Activates a slipstream effect, atm that is display some nitro. */
virtual void setSlipstreamEffect(float f);
virtual void setSlipstreamEffect(float f) OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the start transform, i.e. position and rotation. */
const btTransform& getResetTransform() const {return m_reset_transform;}
// ------------------------------------------------------------------------
/** Returns the controller of this kart. */
virtual Controller* getController() { return m_controller; }
virtual Controller* getController() OVERRIDE { return m_controller; }
// ------------------------------------------------------------------------
/** Returns the controller of this kart (const version). */
const Controller* getController() const { return m_controller; }
// ------------------------------------------------------------------------
/** True if the wheels are touching the ground. */
virtual bool isOnGround() const;
virtual bool isOnGround() const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns true if the kart is close to the ground, used to dis/enable
* the upright constraint to allow for more realistic explosions. */
bool isNearGround() const;
// ------------------------------------------------------------------------
/** Returns true if the kart is eliminated. */
virtual bool isEliminated() const { return m_eliminated; }
virtual bool isEliminated() const OVERRIDE { return m_eliminated; }
// ------------------------------------------------------------------------
virtual void eliminate();
virtual void eliminate() OVERRIDE;
// ------------------------------------------------------------------------
/** Makes a kart invulnerable for a certain amount of time. */
virtual void setInvulnerableTicks(int ticks) OVERRIDE
@ -451,68 +469,74 @@ public:
} // setInvulnerableTicks
// ------------------------------------------------------------------------
/** Returns if the kart is invulnerable. */
virtual bool isInvulnerable() const { return m_invulnerable_ticks > 0; }
virtual bool isInvulnerable() const OVERRIDE
{
return m_invulnerable_ticks > 0;
}
// ------------------------------------------------------------------------
/** Enables a kart shield protection for a certain amount of time. */
virtual void setShieldTime(float t);
virtual void setShieldTime(float t) OVERRIDE;
// ------------------------------------------------------------------------
/** Returns if the kart is protected by a shield. */
virtual bool isShielded() const;
virtual bool isShielded() const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the remaining time the kart is protected by a shield. */
virtual float getShieldTime() const;
virtual float getShieldTime() const OVERRIDE;
// ------------------------------------------------------------------------
/** Decreases the kart's shield time. */
virtual void decreaseShieldTime();
virtual void decreaseShieldTime() OVERRIDE;
// ------------------------------------------------------------------------
/** Sets the energy the kart has collected. */
virtual void setEnergy(float val) { m_collected_energy = val; }
virtual void setEnergy(float val) OVERRIDE { m_collected_energy = val; }
// ------------------------------------------------------------------------
/** Return whether nitro is being used despite the nitro button not being
* pressed due to minimal use time requirements
*/
virtual bool isOnMinNitroTime() const { return m_min_nitro_ticks > 0; }
virtual bool isOnMinNitroTime() const OVERRIDE { return m_min_nitro_ticks > 0; }
// ------------------------------------------------------------------------
/** Returns if the kart is currently being squashed. */
virtual bool isSquashed() const { return m_squash_ticks >0; }
virtual bool isSquashed() const OVERRIDE { return m_squash_ticks >0; }
// ------------------------------------------------------------------------
/** Shows the star effect for a certain time. */
virtual void showStarEffect(float t);
virtual void showStarEffect(float t) OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the terrain info oject. */
virtual const TerrainInfo *getTerrainInfo() const { return m_terrain_info; }
virtual const TerrainInfo *getTerrainInfo() const OVERRIDE
{
return m_terrain_info;
}
// ------------------------------------------------------------------------
virtual void setOnScreenText(const wchar_t *text);
virtual void setOnScreenText(const wchar_t *text) OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the normal of the terrain the kart is over atm. This is
* defined even if the kart is flying. */
virtual const Vec3& getNormal() const;
virtual const Vec3& getNormal() const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns the position 0.25s before */
virtual const Vec3& getPreviousXYZ() const;
virtual const Vec3& getPreviousXYZ() const OVERRIDE;
// ------------------------------------------------------------------------
/** Returns a more recent different previous position */
virtual const Vec3& getRecentPreviousXYZ() const;
virtual const Vec3& getRecentPreviousXYZ() const OVERRIDE;
// ------------------------------------------------------------------------
/** For debugging only: check if a kart is flying. */
bool isFlying() const { return m_flying; }
// ------------------------------------------------------------------------
/** Returns whether this kart wins or loses. */
virtual bool getRaceResult() const { return m_race_result; }
virtual bool getRaceResult() const OVERRIDE { return m_race_result; }
// ------------------------------------------------------------------------
/** Set this kart race result. */
void setRaceResult();
// ------------------------------------------------------------------------
/** Returns whether this kart is a ghost (replay) kart. */
virtual bool isGhostKart() const { return false; }
virtual bool isGhostKart() const OVERRIDE { return false; }
// ------------------------------------------------------------------------
/** Returns whether this kart is jumping. */
virtual bool isJumping() const { return m_is_jumping; };
virtual bool isJumping() const OVERRIDE { return m_is_jumping; };
// ------------------------------------------------------------------------
SFXBase* getNextEmitter();
// ------------------------------------------------------------------------
virtual void playSound(SFXBuffer* buffer);
virtual void playSound(SFXBuffer* buffer) OVERRIDE;
}; // Kart