From 9be16cf605d1b565ad4e84badbb61c1b121fee1f Mon Sep 17 00:00:00 2001 From: n0n4m3 Date: Sat, 16 Jan 2010 19:18:53 +0300 Subject: Some replacements .count to .find for better performance - original patch by zhenya. --HG-- branch : trunk --- src/game/ObjectMgr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game/ObjectMgr.cpp') 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& 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); } } -- cgit v1.2.3