Core/Misc: Rename LinkedListHead::getSize to size to fit standard container naming

This commit is contained in:
Shauren
2025-07-11 17:51:49 +02:00
parent fbbcc31670
commit f4c0ede726
8 changed files with 8 additions and 8 deletions

View File

@@ -2850,7 +2850,7 @@ bool CriteriaHandler::ModifierSatisfied(ModifierTreeEntry const* modifier, uint6
break;
}
case ModifierTreeType::InstancePlayerCountEqual: // 171
if (referencePlayer->GetMap()->GetPlayers().getSize() != reqValue)
if (referencePlayer->GetMap()->GetPlayers().size() != reqValue)
return false;
break;
case ModifierTreeType::CurrencyId: // 172

View File

@@ -48,7 +48,7 @@ struct GridRefManagerContainer
static std::size_t Size(Container const& container)
{
return container.getSize();
return container.size();
}
};

View File

@@ -661,7 +661,7 @@ bool Group::RemoveMember(ObjectGuid guid, RemoveMethod method /*= GROUP_REMOVEME
}
}
if (m_memberMgr.getSize() < ((isLFGGroup() || isBGGroup()) ? 1u : 2u))
if (m_memberMgr.size() < ((isLFGGroup() || isBGGroup()) ? 1u : 2u))
Disband();
else if (player)
{

View File

@@ -991,7 +991,7 @@ void InstanceScript::ResetCombatResurrections()
uint32 InstanceScript::GetCombatResurrectionChargeInterval() const
{
uint32 interval = 0;
if (uint32 playerCount = instance->GetPlayers().getSize())
if (uint32 playerCount = instance->GetPlayers().size())
interval = 90 * MINUTE * IN_MILLISECONDS / playerCount;
return interval;

View File

@@ -2955,7 +2955,7 @@ void InstanceMap::RemovePlayerFromMap(Player* player, bool remove)
i_data->OnPlayerLeave(player);
// if last player set unload timer
if (!m_unloadTimer && m_mapRefManager.getSize() == 1)
if (!m_unloadTimer && m_mapRefManager.size() == 1)
m_unloadTimer = (i_instanceLock && i_instanceLock->IsExpired()) ? MIN_UNLOAD_DELAY : std::max(sWorld->getIntConfig(CONFIG_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
if (i_scenario)

View File

@@ -411,7 +411,7 @@ uint32 MapManager::GetNumInstances() const
uint32 MapManager::GetNumPlayersInInstances() const
{
std::shared_lock<std::shared_mutex> lock(_mapsLock);
return std::accumulate(i_maps.begin(), i_maps.end(), 0u, [](uint32 total, MapMapType::value_type const& value) { return total + (value.second->IsDungeon() ? value.second->GetPlayers().getSize() : 0); });
return std::accumulate(i_maps.begin(), i_maps.end(), 0u, [](uint32 total, MapMapType::value_type const& value) { return total + (value.second->IsDungeon() ? value.second->GetPlayers().size() : 0); });
}
void MapManager::InitInstanceIds()

View File

@@ -142,7 +142,7 @@ struct boss_morogrim_tidewalker : public BossAI
void JustEngagedWith(Unit* who) override
{
Playercount = me->GetMap()->GetPlayers().getSize();
Playercount = me->GetMap()->GetPlayers().size();
Talk(SAY_AGGRO);
_JustEngagedWith(who);
}

View File

@@ -125,7 +125,7 @@ class LinkedListHead
iLast.insertBefore(pElem);
}
uint32 getSize() const
uint32 size() const
{
if (!iSize)
{