Skip to content

Commit

Permalink
Clang: Fix or silence compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa authored Feb 6, 2024
1 parent f156451 commit 6839c00
Show file tree
Hide file tree
Showing 106 changed files with 228 additions and 231 deletions.
2 changes: 1 addition & 1 deletion src/game/AI/EventAI/CreatureEventAI.h
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,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 @@ -155,7 +155,7 @@ struct boss_kazzakAI : public ScriptedAI
DoScriptText(SAY_DEATH, m_creature);
}

void ExecuteActions()
void ExecuteActions() override
{
if (!CanExecuteCombatAction())
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,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 @@ -174,7 +174,7 @@ struct npc_barnesAI : public npc_escortAI, private DialogueHelper
}
}

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

UnitAI* GetAI_npc_barnesAI(Creature* pCreature)
Expand Down Expand Up @@ -441,7 +441,7 @@ struct npc_image_of_medivhAI : public ScriptedAI, private DialogueHelper

void SetEventStarter(ObjectGuid m_starterGuid) { m_eventStarterGuid = m_starterGuid; }

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

UnitAI* GetAI_npc_image_of_medivhAI(Creature* pCreature)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,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 @@ -1307,7 +1307,7 @@ struct npc_highlord_darion_mograineAI : public CombatAI, private DialogueHelper
}
}

void MovementInform(uint32 uiMotionType, uint32 uiPointId)
void MovementInform(uint32 uiMotionType, uint32 uiPointId) override
{
if (uiMotionType != WAYPOINT_MOTION_TYPE || !m_instance)
return;
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 @@ -89,7 +89,7 @@ struct boss_apothecary_hummelAI : public CombatAI
DoCastSpellIfCan(nullptr, SPELL_ALLURING_PERFUME, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
}

void JustPreventedDeath(Unit* killer)
void JustPreventedDeath(Unit* killer) override
{
DoScriptText(SAY_HUMMEL_DEATH, m_creature);

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 @@ -249,7 +249,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 @@ -545,7 +545,7 @@ struct npc_demonic_vaporAI : public CombatAI
});
}

void JustRespawned()
void JustRespawned() override
{
CombatAI::JustRespawned();
m_creature->CastSpell(nullptr, SPELL_DEMONIC_VAPOR_PER, TRIGGERED_OLD_TRIGGERED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class instance_sunwell_plateau : public ScriptedInstance, private DialogueHelper
void OnCreatureEnterCombat(Creature* creature) override;
void OnCreatureDeath(Creature* pCreature) override;
void OnCreatureEvade(Creature* pCreature) override;
void OnPlayerDeath(Player* player);
void OnPlayerDeath(Player* player) override;

void SetData(uint32 uiType, uint32 uiData) override;
uint32 GetData(uint32 uiType) const override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ struct npc_sunblade_scoutAI : public CombatAI
m_creature->SetInCombatWithZone(); // maybe callforhelp instead of linking
}

void MovementInform(uint32 uiType, uint32 uiPointId)
void MovementInform(uint32 uiType, uint32 uiPointId) override
{
if (uiType != POINT_MOTION_TYPE || !uiPointId)
return;
Expand All @@ -101,7 +101,7 @@ struct npc_sunblade_scoutAI : public CombatAI
}
}

void ExecuteAction(uint32 action)
void ExecuteAction(uint32 action) override
{
switch (action)
{
Expand Down Expand Up @@ -201,7 +201,7 @@ struct npc_sunblade_protectorAI : public CombatAI
DoScriptText(SAY_PROTECTOR_REACHED_HOME, m_creature);
}

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 @@ -263,7 +263,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 @@ -97,7 +97,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 @@ -303,7 +303,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 @@ -502,7 +502,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 @@ -703,7 +703,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
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class instance_dark_portal : public ScriptedInstance
void OnObjectCreate(GameObject* pGo) override;

void OnCreatureEnterCombat(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 @@ -110,7 +110,7 @@ struct boss_anetheronAI : public CombatAI
DoScriptText(SAY_ENTER, m_creature);
}

void Aggro(Unit* /*who*/)
void Aggro(Unit* /*who*/) override
{
DoCastSpellIfCan(m_creature, SPELL_VAMPIRIC_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ void instance_mount_hyjal::OnCreatureDeath(Creature* creature)
if (creature->IsTemporarySummon()) // only for non-static spawns
{
int32 enemyCount = 0;
if (enemyCount = instance->GetVariableManager().GetVariable(WORLD_STATE_MOUNT_HYJAL_ENEMYCOUNT))
if ((enemyCount = instance->GetVariableManager().GetVariable(WORLD_STATE_MOUNT_HYJAL_ENEMYCOUNT)))
{
m_waveSpawns.erase(std::remove(m_waveSpawns.begin(), m_waveSpawns.end(), creature->GetObjectGuid()), m_waveSpawns.end());
instance->GetVariableManager().SetVariable(WORLD_STATE_MOUNT_HYJAL_ENEMYCOUNT, enemyCount - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct npc_thrallAI : public hyjalAI

GuidVector m_feralSpirits;

void JustSummoned(Creature* creature)
void JustSummoned(Creature* creature) override
{
if (creature->GetEntry() == NPC_FERAL_SPIRIT)
m_feralSpirits.push_back(creature->GetObjectGuid());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class instance_old_hillsbrad : public ScriptedInstance
void OnObjectCreate(GameObject* pGo) override;

void OnCreatureEnterCombat(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
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 @@ -550,7 +550,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 @@ -883,7 +883,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 @@ -276,7 +276,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 @@ -160,7 +160,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 @@ -108,7 +108,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 @@ -146,7 +146,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 @@ -236,12 +236,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 @@ -359,7 +359,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
Loading

0 comments on commit 6839c00

Please sign in to comment.