fixed some formatting issues.
changed conditional for lord and thises evaluation from hardcoded value to length of the array being evaluated. This doesn't change current functionality, but minimizes code change if these arrays were ever to change in size.
This commit is contained in:
@@ -708,7 +708,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
string thises[] = { "this(", "thisforeach(" };
|
||||
found = string::npos;
|
||||
int i = -1;
|
||||
for (int j = 0; j < 2; ++j)
|
||||
for (int j = 0; j < thises->length(); ++j)
|
||||
{
|
||||
size_t found2 = s.find(thises[j]);
|
||||
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
||||
@@ -792,7 +792,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
|
||||
string lords[] = { "lord(", "foreach(", "aslongas(", "teach(", "all(" };
|
||||
found = string::npos;
|
||||
i = -1;
|
||||
for (int j = 0; j < 5; ++j)
|
||||
for (int j = 0; j < lords->length(); ++j)
|
||||
{
|
||||
size_t found2 = s.find(lords[j]);
|
||||
if (found2 != string::npos && ((found == string::npos) || found2 < found))
|
||||
|
||||
Reference in New Issue
Block a user