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

@@ -604,9 +604,9 @@ void GameObserver::gameStateBasedEffects()
for(int w = 0;w < z->nb_cards;w++)
{
int colored = 0;
for (int i = Constants::MTG_COLOR_GREEN; i <= Constants::MTG_COLOR_WHITE; ++i)
for (int colorIdx = Constants::MTG_COLOR_GREEN; colorIdx <= Constants::MTG_COLOR_WHITE; ++colorIdx)
{
if (z->cards[w]->hasColor(i))
if (z->cards[w]->hasColor(colorIdx))
++colored;
}
if(colored > 1)
@@ -770,7 +770,8 @@ void GameObserver::Affinity()
{
reduce = card->controller()->game->battlefield->countByType(type.c_str());
}
for(int i = 0; i < reduce;i++)
for(int reductionIdx = 0; reductionIdx < reduce; reductionIdx++)
{
if(card->getManaCost()->getCost(color) > 0)
card->getManaCost()->remove(color,1);