Core/Misc: Fix static analysis issues

Fix some static analysis issues reported by Coverity.
Rename SpellMgr::EnsureSpellInfo() to SpellMgr::AssertSpellInfo() to be consistent with other similar methods.
This commit is contained in:
jackpoz
2015-02-08 19:40:03 +01:00
parent 4ba22c5eaf
commit e6f26cfb1f
26 changed files with 45 additions and 34 deletions

View File

@@ -170,7 +170,7 @@ PoolObject* PoolGroup<T>::RollOne(ActivePoolData& spawns, uint64 triggerFrom)
}
if (!EqualChanced.empty())
{
int32 index = irand(0, EqualChanced.size()-1);
uint32 index = urand(0, EqualChanced.size()-1);
// Triggering object is marked as spawned at this time and can be also rolled (respawn case)
// so this need explicit check for this case
if (EqualChanced[index].guid == triggerFrom || !spawns.IsActiveObject<T>(EqualChanced[index].guid))