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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user