[10509] Fix some "foo initialized after bar" gcc warnings and remove some unused variables.

This commit is contained in:
Lynx3d 2010-09-20 10:07:25 +02:00
parent 8ccf9c7464
commit 47397ff19b
10 changed files with 28 additions and 35 deletions

View file

@ -2377,7 +2377,6 @@ void Unit::CalculateHealAbsorb(const uint32 heal, uint32 *absorb)
for(AuraList::const_iterator i = vHealAbsorb.begin(); i != vHealAbsorb.end() && RemainingHeal > 0; ++i)
{
Modifier* mod = (*i)->GetModifier();
SpellEntry const* spellProto = (*i)->GetSpellProto();
// Max Amount can be absorbed by this aura
int32 currentAbsorb = mod->m_amount;
@ -4382,7 +4381,7 @@ void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, int32 stackAmount,
{
if (Aura *dot = GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, UI64LIT(0x0000040000000000), 0x00000000, casterGUID))
{
if(Unit* caster = dot->GetCaster())
if (dot->GetCaster())
{
// use clean value for initial damage
int32 bp0 = dot->GetSpellProto()->CalculateSimpleValue(EFFECT_INDEX_1);
@ -4689,8 +4688,6 @@ void Unit::RemoveSingleAuraFromSpellAuraHolder(SpellAuraHolder *holder, SpellEff
void Unit::RemoveAura(Aura *Aur, AuraRemoveMode mode)
{
SpellEntry const* AurSpellInfo = Aur->GetSpellProto();
// remove from list before mods removing (prevent cyclic calls, mods added before including to aura list - use reverse order)
if (Aur->GetModifier()->m_auraname < TOTAL_AURAS)
{
@ -9621,7 +9618,6 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
continue;
SpellProcEventEntry const *spellProcEvent = i->spellProcEvent;
SpellEntry const *spellInfo = triggeredByHolder->GetSpellProto();
bool useCharges = triggeredByHolder->GetAuraCharges() > 0;
bool procSuccess = true;
bool anyAuraProc = false;