diff options
author | n0n4m3 <none@none> | 2010-01-16 19:18:53 +0300 |
---|---|---|
committer | n0n4m3 <none@none> | 2010-01-16 19:18:53 +0300 |
commit | 9be16cf605d1b565ad4e84badbb61c1b121fee1f (patch) | |
tree | c4ea4911517b73a49f006bb7b9f70aa84f8916ef /src/game/ObjectMgr.cpp | |
parent | 706718b28c8f028d39ec3ca7d3bfefb9f9a62add (diff) |
Some replacements .count to .find for better performance - original patch by zhenya.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 22f70ca007c..89fe1b6a7ea 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -8112,7 +8112,7 @@ void ObjectMgr::LoadTrainerSpell() if(!(cInfo->npcflag & UNIT_NPC_FLAG_TRAINER)) { - if(skip_trainers.count(entry) == 0) + if (skip_trainers.find(entry) == skip_trainers.end()) { sLog.outErrorDb("Table `npc_trainer` have data for not creature template (Entry: %u) without trainer flag, ignore", entry); skip_trainers.insert(entry); @@ -8663,7 +8663,7 @@ void ObjectMgr::CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids) if(!GetTrinityStringLocale (itrM->second.dataint)) sLog.outErrorDb( "Table `db_script_string` not has string id %u used db script (ID: %u)", itrM->second.dataint, itrMM->first); - if(ids.count(itrM->second.dataint)) + if (ids.find(itrM->second.dataint) != ids.end()) ids.erase(itrM->second.dataint); } } |