mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Change emptiness checks to empty() from size() [clang-tidy]
This has two benefits, it's clear what we are checking and size() isn't always constant time, where empty is (performance!)
This commit is contained in:
+2
-2
@@ -1747,7 +1747,7 @@ void Merc::AI_Start(int32 iMoveDelay) {
|
||||
if (!pAIControlled)
|
||||
return;
|
||||
|
||||
if (merc_spells.size() == 0) {
|
||||
if (merc_spells.empty()) {
|
||||
AIautocastspell_timer->SetTimer(1000);
|
||||
AIautocastspell_timer->Disable();
|
||||
} else {
|
||||
@@ -4688,7 +4688,7 @@ bool Merc::LoadMercSpells() {
|
||||
return a.slot > b.slot;
|
||||
});
|
||||
|
||||
if (merc_spells.size() == 0)
|
||||
if (merc_spells.empty())
|
||||
AIautocastspell_timer->Disable();
|
||||
else {
|
||||
HasAISpell = true;
|
||||
|
||||
Reference in New Issue
Block a user