diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-10-01 11:18:29 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-10-01 11:18:29 +0200 |
| commit | 3bf6698116d6d683947ccd23f21bba933dc59a2e (patch) | |
| tree | 0c0f2c82527db192695a95de7bde937c1ca58c92 /src/server/scripts | |
| parent | 7e96b2d7336bf36ec5733c394f46600a98f305d4 (diff) | |
Core/Misc: Fix appleclang 12 warnings
Diffstat (limited to 'src/server/scripts')
4 files changed, 9 insertions, 8 deletions
diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp index 6c6b417a8de..865da13f6bd 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_amanitar.cpp @@ -147,7 +147,7 @@ struct boss_amanitar : public BossAI switch (eventId) { case EVENT_SPAWN: - for (Position const pos : MushroomPositions) + for (Position const& pos : MushroomPositions) SpawnMushroom(pos); break; case EVENT_MINI: diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index c87af7266df..76026b9c31e 100644 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -416,7 +416,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript } break; case DATA_DESPAWN_SNOBOLDS: - for (ObjectGuid const guid : snoboldGUIDS) + for (ObjectGuid guid : snoboldGUIDS) if (Creature* snobold = instance->GetCreature(guid)) snobold->DespawnOrUnsummon(); snoboldGUIDS.clear(); diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index d529ef573e3..0af2b9b6924 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -23,6 +23,7 @@ SDCategory: Instance Script EndScriptData */ #include "ScriptMgr.h" +#include "Containers.h" #include "MotionMaster.h" #include "oculus.h" #include "ScriptedCreature.h" @@ -102,7 +103,7 @@ class boss_urom : public CreatureScript for (uint8 i = 0; i < 3; ++i) group[i] = i; - std::random_shuffle(group, group + 3); + Trinity::Containers::RandomShuffle(group); } void Initialize() diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index 76d31bd203e..887d742f77b 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -229,7 +229,7 @@ struct boss_shade_of_akama : public BossAI events.Reset(); summons.DespawnAll(); - for (ObjectGuid const spawnerGuid : _spawners) + for (ObjectGuid spawnerGuid : _spawners) if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS); @@ -261,7 +261,7 @@ struct boss_shade_of_akama : public BossAI me->SetWalk(false); events.ScheduleEvent(EVENT_ADD_THREAT, Milliseconds(100)); - for (ObjectGuid const spawnerGuid : _spawners) + for (ObjectGuid spawnerGuid : _spawners) if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) spawner->AI()->DoAction(ACTION_STOP_SPAWNING); } @@ -274,7 +274,7 @@ struct boss_shade_of_akama : public BossAI if (Creature* akama = instance->GetCreature(DATA_AKAMA_SHADE)) akama->AI()->DoAction(ACTION_SHADE_OF_AKAMA_DEAD); - for (ObjectGuid const spawnerGuid : _spawners) + for (ObjectGuid spawnerGuid : _spawners) if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS); @@ -316,11 +316,11 @@ struct boss_shade_of_akama : public BossAI } case EVENT_START_CHANNELERS_AND_SPAWNERS: { - for (ObjectGuid const summonGuid : summons) + for (ObjectGuid summonGuid : summons) if (Creature* channeler = ObjectAccessor::GetCreature(*me, summonGuid)) channeler->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); - for (ObjectGuid const spawnerGuid : _spawners) + for (ObjectGuid spawnerGuid : _spawners) if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid)) spawner->AI()->DoAction(ACTION_START_SPAWNING); |
