Skip to content

Commit

Permalink
Fix 'virtual' is redundant since function is already declared as 'ove…
Browse files Browse the repository at this point in the history
…rride' warnings
  • Loading branch information
billy1arm committed Aug 21, 2024
1 parent b700016 commit a7a7378
Show file tree
Hide file tree
Showing 27 changed files with 89 additions and 82 deletions.
11 changes: 9 additions & 2 deletions src/game/BattleGround/BattleGround.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,10 @@ class BattleGround
*
* @return BattleGroundTypeId
*/
BattleGroundTypeId GetTypeID(bool GetRandom = false) const { return GetRandom ? m_RandomTypeID : m_TypeID; }
BattleGroundTypeId GetTypeID(bool GetRandom = false) const
{
return GetRandom ? m_RandomTypeID : m_TypeID;
}
/**
* @brief
*
Expand Down Expand Up @@ -524,7 +527,11 @@ class BattleGround
* @return uint32
*/
uint32 GetBonusHonorFromKill(uint32 kills) const;
bool IsRandom() { return m_IsRandom; }

bool IsRandom()
{
return m_IsRandom;
}

// Set methods:
/**
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundAA.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ class BattleGroundAA : public BattleGround
BattleGroundAA();

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;
};
#endif
14 changes: 7 additions & 7 deletions src/game/BattleGround/BattleGroundAB.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class BattleGroundAB : public BattleGround
* @brief
*
*/
virtual void StartingEventOpenDoors() override;
void StartingEventOpenDoors() override;
/**
* @brief
*
Expand All @@ -253,7 +253,7 @@ class BattleGroundAB : public BattleGround
* @brief
*
*/
virtual void Reset() override;
void Reset() override;
/**
* @brief
*
Expand All @@ -266,7 +266,7 @@ class BattleGroundAB : public BattleGround
* @param player
* @return const WorldSafeLocsEntry
*/
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;

/* Scorekeeping */
/**
Expand All @@ -276,15 +276,15 @@ class BattleGroundAB : public BattleGround
* @param type
* @param value
*/
virtual void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;

/**
* @brief
*
* @param data
* @param count
*/
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
void FillInitialWorldStates(WorldPacket& data, uint32& count) override;

/* Nodes occupying */
/**
Expand All @@ -293,7 +293,7 @@ class BattleGroundAB : public BattleGround
* @param source
* @param target_obj
*/
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;

/* achievement req. */
bool IsAllNodesControlledByTeam(Team team) const override;
Expand All @@ -304,7 +304,7 @@ class BattleGroundAB : public BattleGround
* @brief
*
*/
virtual Team GetPrematureWinner() override;
Team GetPrematureWinner() override;

private:
/* Gameobject spawning/despawning */
Expand Down
14 changes: 7 additions & 7 deletions src/game/BattleGround/BattleGroundAV.h
Original file line number Diff line number Diff line change
Expand Up @@ -400,20 +400,20 @@ class BattleGroundAV : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;

/**
* @brief
*
*/
virtual void StartingEventOpenDoors() override;
void StartingEventOpenDoors() override;
/**
* @brief world states
*
* @param data
* @param count
*/
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
void FillInitialWorldStates(WorldPacket& data, uint32& count) override;

/**
* @brief
Expand All @@ -426,7 +426,7 @@ class BattleGroundAV : public BattleGround
* @brief
*
*/
virtual void Reset() override;
void Reset() override;

/*general stuff*/
/**
Expand All @@ -452,7 +452,7 @@ class BattleGroundAV : public BattleGround
* @param source
* @param target_obj
*/
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
/**
* @brief
*
Expand Down Expand Up @@ -496,14 +496,14 @@ class BattleGroundAV : public BattleGround
* @param plr
* @return const WorldSafeLocsEntry
*/
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* plr) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* plr) override;

/**
* @brief
*
* @return Team
*/
virtual Team GetPrematureWinner() override;
Team GetPrematureWinner() override;

/**
* @brief
Expand Down
6 changes: 3 additions & 3 deletions src/game/BattleGround/BattleGroundBE.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ class BattleGroundBE : public BattleGround
BattleGroundBE();

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player* plr) override;
virtual void StartingEventOpenDoors() override;
void AddPlayer(Player* plr) override;
void StartingEventOpenDoors() override;

void RemovePlayer(Player* plr, ObjectGuid guid) override;
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
void HandleKillPlayer(Player* player, Player* killer) override;
bool HandlePlayerUnderMap(Player* plr) override;

Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundDS.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class BattleGroundDS : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;
};
#endif
14 changes: 7 additions & 7 deletions src/game/BattleGround/BattleGroundEY.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ class BattleGroundEY : public BattleGround
void Update(uint32 diff) override;

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player* plr) override;
virtual void StartingEventOpenDoors() override;
void AddPlayer(Player* plr) override;
void StartingEventOpenDoors() override;

/* BG Flags */
ObjectGuid const& GetFlagCarrierGuid() const { return m_flagCarrier; }
Expand All @@ -266,19 +266,19 @@ class BattleGroundEY : public BattleGround
bool HandleAreaTrigger(Player* source, uint32 trigger) override;
void HandleKillPlayer(Player* player, Player* killer) override;

virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
virtual void Reset() override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
void Reset() override;
void UpdateTeamScore(Team team);
void EndBattleGround(Team winner) override;
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
void SetDroppedFlagGuid(ObjectGuid guid) { m_DroppedFlagGuid = guid;}
void ClearDroppedFlagGuid() { m_DroppedFlagGuid.Clear();}
ObjectGuid const& GetDroppedFlagGuid() const { return m_DroppedFlagGuid;}

/* Battleground Events */
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
virtual void EventPlayerDroppedFlag(Player* source) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
void EventPlayerDroppedFlag(Player* source) override;

/* achievement req. */
bool IsAllNodesControlledByTeam(Team team) const override;
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundIC.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class BattleGroundIC : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;

/* Scorekeeping */
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
Expand Down
8 changes: 4 additions & 4 deletions src/game/BattleGround/BattleGroundMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ class BGQueueInviteEvent : public BasicEvent
* @param p_time
* @return bool
*/
virtual bool Execute(uint64 e_time, uint32 p_time) override;
bool Execute(uint64 e_time, uint32 p_time) override;
/**
* @brief
*
* @param e_time
*/
virtual void Abort(uint64 e_time) override;
void Abort(uint64 e_time) override;
private:
ObjectGuid m_PlayerGuid; /**< TODO */
uint32 m_BgInstanceGUID; /**< TODO */
Expand Down Expand Up @@ -390,13 +390,13 @@ class BGQueueRemoveEvent : public BasicEvent
* @param p_time
* @return bool
*/
virtual bool Execute(uint64 e_time, uint32 p_time) override;
bool Execute(uint64 e_time, uint32 p_time) override;
/**
* @brief
*
* @param e_time
*/
virtual void Abort(uint64 e_time) override;
void Abort(uint64 e_time) override;
private:
ObjectGuid m_PlayerGuid; /**< TODO */
uint32 m_BgInstanceGUID; /**< TODO */
Expand Down
6 changes: 3 additions & 3 deletions src/game/BattleGround/BattleGroundNA.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ class BattleGroundNA : public BattleGround
BattleGroundNA();

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player* plr) override;
virtual void StartingEventOpenDoors() override;
void AddPlayer(Player* plr) override;
void StartingEventOpenDoors() override;

void RemovePlayer(Player* plr, ObjectGuid guid) override;
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
void HandleKillPlayer(Player* player, Player* killer) override;
bool HandlePlayerUnderMap(Player* plr) override;
};
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundRB.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class BattleGroundRB : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;

/* Scorekeeping */
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
Expand Down
6 changes: 3 additions & 3 deletions src/game/BattleGround/BattleGroundRL.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class BattleGroundRL : public BattleGround
BattleGroundRL();

/* inherited from BattlegroundClass */
virtual void AddPlayer(Player* plr) override;
virtual void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
virtual void StartingEventOpenDoors() override;
void AddPlayer(Player* plr) override;
void FillInitialWorldStates(WorldPacket& d, uint32& count) override;
void StartingEventOpenDoors() override;

void RemovePlayer(Player* plr, ObjectGuid guid) override;
void HandleKillPlayer(Player* player, Player* killer) override;
Expand Down
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundRV.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class BattleGroundRV : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;
};
#endif
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundSA.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class BattleGroundSA : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;

/* Scorekeeping */
void UpdatePlayerScore(Player* source, uint32 type, uint32 value) override;
Expand Down
18 changes: 9 additions & 9 deletions src/game/BattleGround/BattleGroundWS.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ class BattleGroundWS : public BattleGround
*
* @param plr
*/
virtual void AddPlayer(Player* plr) override;
void AddPlayer(Player* plr) override;
/**
* @brief
*
*/
virtual void StartingEventOpenDoors() override;
void StartingEventOpenDoors() override;

/**
* @brief BG Flags
Expand Down Expand Up @@ -244,20 +244,20 @@ class BattleGroundWS : public BattleGround
*
* @param source
*/
virtual void EventPlayerDroppedFlag(Player* source) override;
void EventPlayerDroppedFlag(Player* source) override;
/**
* @brief
*
* @param source
* @param target_obj
*/
virtual void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
void EventPlayerClickedOnFlag(Player* source, GameObject* target_obj) override;
/**
* @brief
*
* @param source
*/
virtual void EventPlayerCapturedFlag(Player* source) override;
void EventPlayerCapturedFlag(Player* source) override;

/**
* @brief
Expand All @@ -284,7 +284,7 @@ class BattleGroundWS : public BattleGround
* @brief
*
*/
virtual void Reset() override;
void Reset() override;
/**
* @brief
*
Expand All @@ -297,7 +297,7 @@ class BattleGroundWS : public BattleGround
* @param player
* @return const WorldSafeLocsEntry
*/
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
WorldSafeLocsEntry const* GetClosestGraveYard(Player* player) override;
uint32 GetRemainingTimeInMinutes() { return m_EndTimer ? (m_EndTimer - 1) / (MINUTE * IN_MILLISECONDS) + 1 : 0; }

/**
Expand Down Expand Up @@ -347,12 +347,12 @@ class BattleGroundWS : public BattleGround
* @param data
* @param count
*/
virtual void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
void FillInitialWorldStates(WorldPacket& data, uint32& count) override;
/**
* @brief
*
*/
virtual Team GetPrematureWinner() override;
Team GetPrematureWinner() override;

private:
ObjectGuid m_flagCarrierAlliance; /**< TODO */
Expand Down
2 changes: 1 addition & 1 deletion src/game/Object/Creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ class Creature : public Unit
void SetNoSearchAssistance(bool val) { m_AlreadySearchedAssistance = val; }
bool HasSearchedAssistance() { return m_AlreadySearchedAssistance; }
bool CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction = true) const;
virtual bool CanInitiateAttack() const override;
bool CanInitiateAttack() const override;

MovementGeneratorType GetDefaultMovementType() const { return m_defaultMovementType; }
void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; }
Expand Down
2 changes: 1 addition & 1 deletion src/game/Object/Player.h
Original file line number Diff line number Diff line change
Expand Up @@ -2526,7 +2526,7 @@ class Player : public Unit

Camera& GetCamera() { return m_camera; }

virtual void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite Unit::SetPhaseMask
void SetPhaseMask(uint32 newPhaseMask, bool update) override;// overwrite Unit::SetPhaseMask

uint8 m_forced_speed_changes[MAX_MOVE_TYPE];

Expand Down
Loading

0 comments on commit a7a7378

Please sign in to comment.