Core: Do not use STL container size method to check if container is empty
This commit is contained in:
@@ -144,7 +144,7 @@ public:
|
||||
// Get the Threat List
|
||||
std::list<HostileReference *> m_threatlist = me->getThreatManager().getThreatList();
|
||||
|
||||
if (!m_threatlist.size()) // He doesn't have anyone in his threatlist, useless to continue
|
||||
if (m_threatlist.empty()) // He doesn't have anyone in his threatlist, useless to continue
|
||||
return;
|
||||
|
||||
std::list<Unit* > targets;
|
||||
|
||||
@@ -776,7 +776,7 @@ public:
|
||||
target_list.push_back(pTarget);
|
||||
pTarget = NULL;
|
||||
}
|
||||
if (target_list.size())
|
||||
if (!target_list.empty())
|
||||
pTarget = *(target_list.begin()+rand()%target_list.size());
|
||||
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
Reference in New Issue
Block a user