Skip to content

Commit

Permalink
Clang: Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Feb 6, 2024
1 parent 90c384d commit ad54018
Show file tree
Hide file tree
Showing 60 changed files with 154 additions and 158 deletions.
2 changes: 1 addition & 1 deletion src/game/AI/BaseAI/CreatureAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CreatureAI : public UnitAI

void AddUnreachabilityCheck(); // use in constructor

CreatureSpellList const& GetSpellList() const;
CreatureSpellList const& GetSpellList() const override;

void TimedFleeingEnded() override;

Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/EventAI/CreatureEventAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ class CreatureEventAI : public CreatureAI
void SpellHit(Unit* unit, const SpellEntry* spellInfo) override;
void SpellHitTarget(Unit* target, const SpellEntry* spell) override;
void DamageTaken(Unit* dealer, uint32& damage, DamageEffectType damagetype, SpellEntry const* spellInfo) override;
void JustPreventedDeath(Unit* attacker);
void JustPreventedDeath(Unit* attacker) override;
void HealedBy(Unit* healer, uint32& healedAmount) override;
void ReceiveEmote(Player* player, uint32 textEmote) override;
void SummonedCreatureJustDied(Creature* summoned) override;
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/ScriptDevAI/base/CombatAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CombatAI : public ScriptedAI

void HandleDelayedInstantAnimation(SpellEntry const* spellInfo) override;
void HandleTargetRestoration();
bool IsTargetingRestricted();
bool IsTargetingRestricted() override;
void StopTargeting(bool state) { m_stopTargeting = state; }
void OnTaunt() override;

Expand Down
8 changes: 4 additions & 4 deletions src/game/AI/ScriptDevAI/base/TimerAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,23 +138,23 @@ class CombatActions : public TimerManager
void AddTimerlessCombatAction(uint32 id, bool byDefault);

virtual void ResetTimer(uint32 index, uint32 timer) override;
virtual void ResetTimer(uint32 index, std::chrono::milliseconds timer)
virtual void ResetTimer(uint32 index, std::chrono::milliseconds timer) override
{
ResetTimer(index, timer.count());
}
virtual void DisableTimer(uint32 index) override;
virtual void ReduceTimer(uint32 index, uint32 timer) override;
virtual void ReduceTimer(uint32 index, std::chrono::milliseconds timer)
virtual void ReduceTimer(uint32 index, std::chrono::milliseconds timer) override
{
ReduceTimer(index, timer.count());
}
virtual void DelayTimer(uint32 index, uint32 timer) override;
virtual void DelayTimer(uint32 index, std::chrono::milliseconds timer)
virtual void DelayTimer(uint32 index, std::chrono::milliseconds timer) override
{
DelayTimer(index, timer.count());
}
virtual void ResetIfNotStarted(uint32 index, uint32 timer) override;
virtual void ResetIfNotStarted(uint32 index, std::chrono::milliseconds timer)
virtual void ResetIfNotStarted(uint32 index, std::chrono::milliseconds timer) override
{
ResetIfNotStarted(index, timer.count());
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/ScriptDevAI/base/pet_ai.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ScriptedPetAI : public CreatureAI

void CombatStop() override;

virtual void Reset() {}
virtual void Reset() override {}

virtual void UpdatePetAI(const uint32 diff); // while in combat

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct FlagAuraBg : public AuraScript, public SpellScript
return SPELL_AURA_PROC_OK;
}

void OnApply(Aura* aura, bool apply) const
void OnApply(Aura* aura, bool apply) const override
{
Unit* unitTarget = aura->GetTarget();
if (!unitTarget || !unitTarget->IsPlayer())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ struct npc_kernobeeAI : public FollowerAI
}
}

void UpdateFollowerAI(const uint32 uiDiff)
void UpdateFollowerAI(const uint32 uiDiff) override
{
FollowerAI::UpdateFollowerAI(uiDiff); // Do combat handling

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct boss_baron_geddonAI : public CombatAI
m_instance->SetData(TYPE_GEDDON, NOT_STARTED);
}

void ExecuteAction(uint32 action)
void ExecuteAction(uint32 action) override
{
switch (action)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ struct boss_stalaggAI : public boss_thaddiusAddsAI
DoScriptText(SAY_STAL_SLAY, m_creature);
}

void UpdateAddAI(const uint32 diff)
void UpdateAddAI(const uint32 diff) override
{
if (m_powerSurgeTimer < diff)
{
Expand Down Expand Up @@ -572,7 +572,7 @@ struct boss_feugenAI : public boss_thaddiusAddsAI
DoScriptText(SAY_FEUG_SLAY, m_creature);
}

void UpdateAddAI(const uint32 diff)
void UpdateAddAI(const uint32 diff) override
{
if (m_magneticPullTimer < diff)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class instance_scholomance : public ScriptedInstance
void Initialize() override;

void OnCreatureEnterCombat(Creature* pCreature) override;
void OnCreatureEvade(Creature* pCreature);
void OnCreatureEvade(Creature* pCreature) override;
void OnCreatureDeath(Creature* pCreature) override;

void OnCreatureCreate(Creature* pCreature) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ struct npc_squire_roweAI : public npc_escortAI, private DialogueHelper
// Check if the event is already running
bool IsStormwindQuestActive() const { return m_isEventInProgress; }

void UpdateEscortAI(const uint32 uiDiff) { DialogueUpdate(uiDiff); }
void UpdateEscortAI(const uint32 uiDiff) override { DialogueUpdate(uiDiff); }
};

UnitAI* GetAI_npc_squire_rowe(Creature* creature)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ class instance_stratholme : public ScriptedInstance
bool CheckConditionCriteriaMeet(Player const* player, uint32 instanceConditionId, WorldObject const* conditionSource, uint32 conditionSourceType) const override;

void OnCreatureEnterCombat(Creature* creature) override;
void OnCreatureEvade(Creature* creature);
void OnCreatureEvade(Creature* creature) override;
void OnCreatureDeath(Creature* creature) override;
void OnCreatureRespawn(Creature* creature) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class instance_sunken_temple : public ScriptedInstance
void OnObjectCreate(GameObject* pGo) override;
void OnCreatureCreate(Creature* pCreature) override;

void OnCreatureEvade(Creature* pCreature);
void OnCreatureEvade(Creature* pCreature) override;
void OnCreatureDeath(Creature* pCreature) override;

void SetData(uint32 uiType, uint32 uiData) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ struct mob_ohganAI : public CombatAI
}
}

void ExecuteAction(uint32 action)
void ExecuteAction(uint32 action) override
{
if (action == 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ struct boss_thekalBaseAI : public CombatAI
virtual void OnFakeingDeath() {}
virtual bool OnRevive() { return false; }

void JustPreventedDeath(Unit* /*attacker*/)
void JustPreventedDeath(Unit* /*attacker*/) override
{
m_creature->InterruptNonMeleeSpells(true);
m_creature->StopMoving();
Expand Down Expand Up @@ -304,7 +304,7 @@ struct boss_thekalAI : public boss_thekalBaseAI
zath->AI()->EnterEvadeMode();
}

void ExecuteAction(uint32 action)
void ExecuteAction(uint32 action) override
{
if (action == THEKAL_TIGER_ENRAGE)
{
Expand Down
4 changes: 2 additions & 2 deletions src/game/AI/ScriptDevAI/scripts/kalimdor/azshara.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ struct npc_felhound_trackerAI : public ScriptedPetAI
m_uiWaitTimer = 20000;
}

void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote)
void ReceiveEmote(Player* pPlayer, uint32 uiTextEmote) override
{
// Only react if player is on the quest
if (pPlayer->GetQuestStatus(QUEST_AZSHARITE) != QUEST_STATUS_INCOMPLETE)
Expand Down Expand Up @@ -491,7 +491,7 @@ struct boss_mawsAI : public ScriptedAI
DoCastSpellIfCan(nullptr, SPELL_THRASH, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
}

void JustDied(Unit* /*pKiller*/)
void JustDied(Unit* /*pKiller*/) override
{
// Despawn visual lightning GO
if (GameObject* lightning = GetClosestGameObjectWithEntry(m_creature, GO_THEATRIC_LIGHTNING, 200.0f))
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/ScriptDevAI/scripts/kalimdor/desolace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ struct npc_cork_gizeltonAI : public npc_escortAI
}


void CreatureGroupMemberDied(Unit* /*killed*/)
void CreatureGroupMemberDied(Unit* /*killed*/) override
{
StatusFailed = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ struct npc_stinky_ignatzAI : public npc_escortAI
}
}

void WaypointStart(uint32 uiPointId)
void WaypointStart(uint32 uiPointId) override
{
if (uiPointId == 31)
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/AI/ScriptDevAI/scripts/kalimdor/feralas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ struct npc_shay_leafrunnerAI : public FollowerAI
}
}

void UpdateFollowerAI(const uint32 uiDiff)
void UpdateFollowerAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->GetVictim())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ struct npc_buru_eggAI : public Scripted_NoMovementAI
}
}

void SpellHit(Unit* /*caster*/, const SpellEntry* spellInfo)
void SpellHit(Unit* /*caster*/, const SpellEntry* spellInfo) override
{
if (spellInfo->Id == SPELL_BURU_TRANSFORM)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class instance_ruins_of_ahnqiraj : public ScriptedInstance
void OnPlayerEnter(Player* pPlayer) override;

void OnCreatureEnterCombat(Creature* pCreature) override;
void OnCreatureEvade(Creature* pCreature);
void OnCreatureEvade(Creature* pCreature) override;
void OnCreatureDeath(Creature* pCreature) override;
void OnCreatureRespawn(Creature* creature) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ struct go_covertopsAI : public GameObjectAI
Reset();
}

void UpdateAI(const uint32 diff)
void UpdateAI(const uint32 diff) override
{
switch (m_phase)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct boss_silithidRoyaltyAI : public CombatAI
}

// Handle damage to trigger consume when the two bosses that are killed first
void JustPreventedDeath(Unit* attacker)
void JustPreventedDeath(Unit* attacker) override
{
if (!m_instance)
return;
Expand Down Expand Up @@ -151,7 +151,7 @@ struct boss_silithidRoyaltyAI : public CombatAI
DoCastSpellIfCan(nullptr, m_deathAbility);
}

void MovementInform(uint32 motionType, uint32 pointId)
void MovementInform(uint32 motionType, uint32 pointId) override
{
if (motionType != POINT_MOTION_TYPE)
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ struct InitializeImage : public SpellScript
}
}

bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const
bool OnCheckTarget(const Spell* spell, Unit* target, SpellEffectIndex eff) const override
{
if (target->GetSpawnerGuid()) // only original spawn can be hit by this
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,12 @@ struct boss_veknilashAI : public boss_twin_emperorsAI
DoScriptText(SAY_VEKNILASH_DEATH, m_creature);
}

bool DoHandleBugAbility()
bool DoHandleBugAbility() override
{
return DoCastSpellIfCan(nullptr, SPELL_MUTATE_BUG) == CAST_OK;
}

bool DoHandleBerserk()
bool DoHandleBerserk() override
{
return DoCastSpellIfCan(nullptr, SPELL_BERSERK) == CAST_OK;
}
Expand Down Expand Up @@ -360,7 +360,7 @@ struct boss_veklorAI : public boss_twin_emperorsAI
return DoCastSpellIfCan(nullptr, SPELL_EXPLODE_BUG) == CAST_OK;
}

bool DoHandleBerserk()
bool DoHandleBerserk() override
{
return DoCastSpellIfCan(nullptr, SPELL_FRENZY) == CAST_OK;
}
Expand Down
10 changes: 5 additions & 5 deletions src/game/AI/ScriptDevAI/scripts/kalimdor/world_kalimdor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct world_map_kalimdor : public ScriptedMap
uint32 m_uiDronesTimer;
uint32 m_freedSpriteDarter;

void Initialize()
void Initialize() override
{
m_uiMurkdeepAdds_KilledAddCount = 0;
m_vGOEvents.clear();
Expand All @@ -67,7 +67,7 @@ struct world_map_kalimdor : public ScriptedMap
memset(&m_encounter, 0, sizeof(m_encounter));
}

void OnCreatureCreate(Creature* pCreature)
void OnCreatureCreate(Creature* pCreature) override
{
switch (pCreature->GetEntry())
{
Expand All @@ -86,7 +86,7 @@ struct world_map_kalimdor : public ScriptedMap
}
}

void OnCreatureDeath(Creature* pCreature)
void OnCreatureDeath(Creature* pCreature) override
{
switch (pCreature->GetEntry())
{
Expand Down Expand Up @@ -253,7 +253,7 @@ struct world_map_kalimdor : public ScriptedMap
return false;
}

void Update(uint32 diff)
void Update(uint32 diff) override
{
if (!m_vGOEvents.empty())
{
Expand Down Expand Up @@ -317,7 +317,7 @@ struct world_map_kalimdor : public ScriptedMap
}
}

void SetData(uint32 uiType, uint32 uiData)
void SetData(uint32 uiType, uint32 uiData) override
{
switch (uiType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class instance_zulfarrak : public ScriptedInstance
void Initialize() override;

void OnCreatureEnterCombat(Creature* pCreature) override;
void OnCreatureEvade(Creature* pCreature);
void OnCreatureEvade(Creature* pCreature) override;
void OnCreatureDeath(Creature* pCreature) override;

void OnCreatureCreate(Creature* pCreature) override;
Expand Down
Loading

0 comments on commit ad54018

Please sign in to comment.