Core/Misc: Simplify LinkedListHead::isEmpty and rename to empty to fit standard container naming

This commit is contained in:
Shauren
2025-07-11 17:47:14 +02:00
parent cbb532e4be
commit fbbcc31670
17 changed files with 34 additions and 38 deletions

View File

@@ -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())

View File

@@ -310,7 +310,7 @@ public:
if (WipeTimer <= diff)
{
Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (PlayerList.isEmpty())
if (PlayerList.empty())
return;
RaidWiped = true;

View File

@@ -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))

View File

@@ -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())

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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())