Flagged numerous peices of code that have local variables that are masking either member variables or variables scoped outside the current scope.

I've marked all the ones I found with the following TODO comment:

TODO: C6246: <blah blah>

a few in particular are the ones related to "oneShot" and "_target".  These are local variables that are declared that
mask either a method parameter or a member variable.
This commit is contained in:
techdragon.nguyen@gmail.com
2011-04-21 10:04:32 +00:00
parent 8ed84aa97d
commit 8bf983e2e5
13 changed files with 70 additions and 53 deletions

View File

@@ -459,6 +459,7 @@ int GuiCombat::receiveEventPlus(WEvent* e)
attackers.push_back(t);
return 1;
}
// TODO: C6246: Clarify event, which event are you referring to?
else if (WEventCreatureBlocker* event = dynamic_cast<WEventCreatureBlocker*>(e))
{
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
@@ -477,6 +478,7 @@ int GuiCombat::receiveEventPlus(WEvent* e)
}
return 0;
}
// TODO: C6246: Clarify event, which event are you referring to?
else if (WEventCreatureBlockerRank* event = dynamic_cast<WEventCreatureBlockerRank*>(e))
{
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
@@ -543,6 +545,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
}
return 0;
}
// TODO: C6246: Clarify event, which event are you referring to?
else if (WEventCreatureBlocker* event = dynamic_cast<WEventCreatureBlocker*>(e))
{
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
@@ -557,6 +560,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
}
return 0;
}
// TODO: C6246: Clarify event->to->id, which event are you referring to?
else if (WEventPhaseChange* event = dynamic_cast<WEventPhaseChange*>(e))
{
if (Constants::MTG_PHASE_COMBATDAMAGE == event->to->id)
@@ -564,6 +568,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
else
cursor_pos = NONE;
}
// TODO: C6246: Clarify event->step, which event are you referring to?
else if (WEventCombatStepChange* event = dynamic_cast<WEventCombatStepChange*>(e))
switch (event->step)
{