mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Simplify LinkedListHead::isEmpty and rename to empty to fit standard container naming
This commit is contained in:
@@ -207,7 +207,7 @@ struct boss_coren_direbrew : public BossAI
|
||||
_JustDied();
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
if (Group* group = players.begin()->GetSource()->GetGroup())
|
||||
if (group->isLFGGroup())
|
||||
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
if (WipeTimer <= diff)
|
||||
{
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (PlayerList.isEmpty())
|
||||
if (PlayerList.empty())
|
||||
return;
|
||||
|
||||
RaidWiped = true;
|
||||
|
||||
@@ -1263,7 +1263,7 @@ public:
|
||||
{
|
||||
// search players with in 50 yards for quest credit
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
if (!PlayerList.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
if (me->IsWithinDistInMap(i->GetSource(), 500))
|
||||
|
||||
@@ -174,7 +174,7 @@ struct boss_apothecary_hummel : public BossAI
|
||||
instance->SetBossState(BOSS_APOTHECARY_HUMMEL, DONE);
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
if (Group* group = players.begin()->GetSource()->GetGroup())
|
||||
if (group->isLFGGroup())
|
||||
|
||||
@@ -97,7 +97,7 @@ class instance_sunwell_plateau : public InstanceMapScript
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
//what other conditions to check?
|
||||
bool CanProgressEvent()
|
||||
{
|
||||
if (instance->GetPlayers().isEmpty())
|
||||
if (instance->GetPlayers().empty())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -188,7 +188,7 @@ public:
|
||||
TC_LOG_DEBUG("scripts", "Instance The Black Morass: Event completed.");
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -98,7 +98,7 @@ void AggroAllPlayers(Creature* temp)
|
||||
{
|
||||
Map::PlayerList const& PlList = temp->GetMap()->GetPlayers();
|
||||
|
||||
if (PlList.isEmpty())
|
||||
if (PlList.empty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
if (uiChargeTimer <= uiDiff)
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -281,7 +281,7 @@ public:
|
||||
if (Unit* pPassenger = pVehicle->GetPassenger(SEAT_ID_0))
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -399,7 +399,7 @@ public:
|
||||
if (uiInterceptTimer <= uiDiff)
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
@@ -863,7 +863,7 @@ public:
|
||||
else
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -374,7 +374,7 @@ public:
|
||||
void AggroAllPlayers(Creature* temp)
|
||||
{
|
||||
Map::PlayerList const& PlList = me->GetMap()->GetPlayers();
|
||||
if (PlList.isEmpty())
|
||||
if (PlList.empty())
|
||||
return;
|
||||
|
||||
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
|
||||
|
||||
@@ -216,7 +216,7 @@ struct boss_four_horsemen_baseAI : public BossAI
|
||||
}
|
||||
instance->SetBossState(BOSS_HORSEMEN, IN_PROGRESS);
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (players.isEmpty()) // sanity check
|
||||
if (players.empty()) // sanity check
|
||||
ResetEncounter();
|
||||
|
||||
for (Horseman boss : horsemen)
|
||||
|
||||
@@ -249,7 +249,7 @@ struct boss_the_lurker_below : public BossAI
|
||||
{
|
||||
InRange = false;
|
||||
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
|
||||
if (!PlayerList.isEmpty())
|
||||
if (!PlayerList.empty())
|
||||
{
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
|
||||
@@ -133,7 +133,7 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
Water = WATERSTATE_FRENZY;
|
||||
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
if (PlayerList.isEmpty())
|
||||
if (PlayerList.empty())
|
||||
return;
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
|
||||
@@ -203,7 +203,7 @@ struct boss_ahune : public BossAI
|
||||
Unit::Kill(me, frozenCore);
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (!players.empty())
|
||||
{
|
||||
if (Group* group = players.begin()->GetSource()->GetGroup())
|
||||
if (group->isLFGGroup())
|
||||
|
||||
Reference in New Issue
Block a user