mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 15:16:24 +00:00
refactor(Core): apply clang-tidy modernize-use-override (#3817)
This commit is contained in:
@@ -274,7 +274,7 @@ class Map : public GridRefManager<NGridType>
|
||||
friend class MapReference;
|
||||
public:
|
||||
Map(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent = nullptr);
|
||||
virtual ~Map();
|
||||
~Map() override;
|
||||
|
||||
MapEntry const* GetEntry() const { return i_mapEntry; }
|
||||
|
||||
@@ -676,24 +676,24 @@ class InstanceMap : public Map
|
||||
{
|
||||
public:
|
||||
InstanceMap(uint32 id, uint32 InstanceId, uint8 SpawnMode, Map* _parent);
|
||||
~InstanceMap();
|
||||
bool AddPlayerToMap(Player*);
|
||||
void RemovePlayerFromMap(Player*, bool);
|
||||
void AfterPlayerUnlinkFromMap();
|
||||
void Update(const uint32, const uint32, bool thread = true);
|
||||
~InstanceMap() override;
|
||||
bool AddPlayerToMap(Player*) override;
|
||||
void RemovePlayerFromMap(Player*, bool) override;
|
||||
void AfterPlayerUnlinkFromMap() override;
|
||||
void Update(const uint32, const uint32, bool thread = true) override;
|
||||
void CreateInstanceScript(bool load, std::string data, uint32 completedEncounterMask);
|
||||
bool Reset(uint8 method, std::list<uint32>* globalSkipList = nullptr);
|
||||
uint32 GetScriptId() { return i_script_id; }
|
||||
InstanceScript* GetInstanceScript() { return instance_script; }
|
||||
void PermBindAllPlayers();
|
||||
void UnloadAll();
|
||||
bool CanEnter(Player* player, bool loginCheck = false);
|
||||
void UnloadAll() override;
|
||||
bool CanEnter(Player* player, bool loginCheck = false) override;
|
||||
void SendResetWarnings(uint32 timeLeft) const;
|
||||
|
||||
uint32 GetMaxPlayers() const;
|
||||
uint32 GetMaxResetDelay() const;
|
||||
|
||||
virtual void InitVisibilityDistance();
|
||||
void InitVisibilityDistance() override;
|
||||
private:
|
||||
bool m_resetAfterUnload;
|
||||
bool m_unloadWhenEmpty;
|
||||
@@ -705,16 +705,16 @@ class BattlegroundMap : public Map
|
||||
{
|
||||
public:
|
||||
BattlegroundMap(uint32 id, uint32 InstanceId, Map* _parent, uint8 spawnMode);
|
||||
~BattlegroundMap();
|
||||
~BattlegroundMap() override;
|
||||
|
||||
bool AddPlayerToMap(Player*);
|
||||
void RemovePlayerFromMap(Player*, bool);
|
||||
bool CanEnter(Player* player, bool loginCheck = false);
|
||||
bool AddPlayerToMap(Player*) override;
|
||||
void RemovePlayerFromMap(Player*, bool) override;
|
||||
bool CanEnter(Player* player, bool loginCheck = false) override;
|
||||
void SetUnload();
|
||||
//void UnloadAll(bool pForce);
|
||||
void RemoveAllPlayers();
|
||||
void RemoveAllPlayers() override;
|
||||
|
||||
virtual void InitVisibilityDistance();
|
||||
void InitVisibilityDistance() override;
|
||||
Battleground* GetBG() { return m_bg; }
|
||||
void SetBG(Battleground* bg) { m_bg = bg; }
|
||||
private:
|
||||
|
||||
@@ -18,14 +18,14 @@ public:
|
||||
typedef std::unordered_map< uint32, Map*> InstancedMaps;
|
||||
|
||||
MapInstanced(uint32 id);
|
||||
~MapInstanced() {}
|
||||
~MapInstanced() override {}
|
||||
|
||||
// functions overwrite Map versions
|
||||
void Update(const uint32, const uint32, bool thread = true);
|
||||
void DelayedUpdate(const uint32 diff);
|
||||
void Update(const uint32, const uint32, bool thread = true) override;
|
||||
void DelayedUpdate(const uint32 diff) override;
|
||||
//void RelocationNotify();
|
||||
void UnloadAll();
|
||||
bool CanEnter(Player* player, bool loginCheck = false);
|
||||
void UnloadAll() override;
|
||||
bool CanEnter(Player* player, bool loginCheck = false) override;
|
||||
|
||||
Map* CreateInstanceForPlayer(const uint32 mapId, Player* player);
|
||||
Map* FindInstanceMap(uint32 instanceId) const
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
bool DestroyInstance(InstancedMaps::iterator& itr);
|
||||
|
||||
InstancedMaps& GetInstancedMaps() { return m_InstancedMaps; }
|
||||
virtual void InitVisibilityDistance();
|
||||
void InitVisibilityDistance() override;
|
||||
|
||||
private:
|
||||
InstanceMap* CreateInstance(uint32 InstanceId, InstanceSave* save, Difficulty difficulty);
|
||||
|
||||
@@ -13,25 +13,25 @@
|
||||
class MapReference : public Reference<Map, Player>
|
||||
{
|
||||
protected:
|
||||
void targetObjectBuildLink()
|
||||
void targetObjectBuildLink() override
|
||||
{
|
||||
// called from link()
|
||||
getTarget()->m_mapRefManager.insertFirst(this);
|
||||
getTarget()->m_mapRefManager.incSize();
|
||||
}
|
||||
void targetObjectDestroyLink()
|
||||
void targetObjectDestroyLink() override
|
||||
{
|
||||
// called from unlink()
|
||||
if (isValid()) getTarget()->m_mapRefManager.decSize();
|
||||
}
|
||||
void sourceObjectDestroyLink()
|
||||
void sourceObjectDestroyLink() override
|
||||
{
|
||||
// called from invalidate()
|
||||
getTarget()->m_mapRefManager.decSize();
|
||||
}
|
||||
public:
|
||||
MapReference() : Reference<Map, Player>() {}
|
||||
~MapReference() { unlink(); }
|
||||
~MapReference() override { unlink(); }
|
||||
MapReference* next() { return (MapReference*)Reference<Map, Player>::next(); }
|
||||
MapReference const* next() const { return (MapReference const*)Reference<Map, Player>::next(); }
|
||||
MapReference* nockeck_prev() { return (MapReference*)Reference<Map, Player>::nocheck_prev(); }
|
||||
|
||||
@@ -43,7 +43,7 @@ class LFGUpdateRequest : public UpdateRequest
|
||||
public:
|
||||
LFGUpdateRequest(MapUpdater& u, uint32 d) : m_updater(u), m_diff(d) {}
|
||||
|
||||
void call()
|
||||
void call() override
|
||||
{
|
||||
uint32 startTime = getMSTime();
|
||||
sLFGMgr->Update(m_diff, 1);
|
||||
|
||||
Reference in New Issue
Block a user