Core/Misc: Fix static analysis issues reported by Coverity Scan

(cherry picked from commit de88691e25)
This commit is contained in:
jackpoz
2019-06-28 22:18:30 +02:00
committed by Shauren
parent 88457030cc
commit 841630fcc3
9 changed files with 13 additions and 7 deletions

View File

@@ -1140,7 +1140,7 @@ struct npc_sergeant_morigan : public CreatureScript
struct npc_sergeant_moriganAI : public NullCreatureAI
{
npc_sergeant_moriganAI(Creature* creature) : NullCreatureAI(creature), Started(false) { }
npc_sergeant_moriganAI(Creature* creature) : NullCreatureAI(creature), Started(false), Question(0) { }
void InitializeAI() override
{

View File

@@ -1640,7 +1640,7 @@ struct npc_stratholme_rp_dummy : NullCreatureAI
{
if (type == POINT_MOTION_TYPE || type == EFFECT_MOTION_TYPE || type == SPLINE_CHAIN_MOTION_TYPE)
if (TempSummon* self = me->ToTempSummon())
self->GetSummonerCreatureBase()->AI()->MovementInform(type, id);
ASSERT_NOTNULL(self->GetSummonerCreatureBase())->AI()->MovementInform(type, id);
}
};

View File

@@ -769,7 +769,7 @@ class boss_thorim : public CreatureScript
for (auto itr = triggers.cbegin(); itr != triggers.cend();)
{
auto prev = itr++;
if (itr != triggers.end())
if (itr != triggers.cend())
(*prev)->CastSpell(*itr, SPELL_LIGHTNING_BEAM_CHANNEL);
}
break;