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

@@ -484,6 +484,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
else if (attribute.find("share!") != string::npos)
{
size_t start = attribute.find("share!");
// TODO: C6246: Clarify end, is this independant of the "end" declared outside this scope?
size_t end = attribute.rfind("!");
string CDtype = attribute.substr(start + 6,end - start);
if( card && card->isSpell() && card->backupTargets[0]->typeAsTarget() == TARGET_STACKACTION)
@@ -546,6 +547,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
else
{
size_t start = attribute.find("{");
// TODO: C6246: Clarify end, is this independant of the "end" declared outside this scope?
size_t end = attribute.find("}");
string counterString = attribute.substr(start + 1, end - start - 1);
AbilityFactory abf;