Some replacements .count to .find for better performance - original patch by zhenya.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-01-16 19:18:53 +03:00
parent 706718b28c
commit 9be16cf605
3 changed files with 15 additions and 15 deletions

View File

@@ -91,7 +91,7 @@ void LoadSkillDiscoveryTable()
SpellEntry const* reqSpellEntry = sSpellStore.LookupEntry(reqSkillOrSpell);
if (!reqSpellEntry)
{
if(reportedReqSpells.count(reqSkillOrSpell)==0)
if (reportedReqSpells.find(reqSkillOrSpell) == reportedReqSpells.end())
{
sLog.outErrorDb("Spell (ID: %u) have not existed spell (ID: %i) in `reqSpell` field in `skill_discovery_template` table",spellId,reqSkillOrSpell);
reportedReqSpells.insert(reqSkillOrSpell);
@@ -104,7 +104,7 @@ void LoadSkillDiscoveryTable()
// explicit discovery ability
!IsExplicitDiscoverySpell(reqSpellEntry))
{
if (reportedReqSpells.count(reqSkillOrSpell)==0)
if (reportedReqSpells.find(reqSkillOrSpell) == reportedReqSpells.end())
{
sLog.outErrorDb("Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc"
" and not 100%% chance random discovery ability but listed for spellId %u (and maybe more) in `skill_discovery_template` table",