just cleaning up a memleak i created, moving the parsing of the "newability" in transforms into the resolve rather then creating an object that might not be used.

This commit is contained in:
omegablast2002@yahoo.com
2011-03-30 22:10:45 +00:00
parent 3f39b19c87
commit 257de9962a
3 changed files with 33 additions and 34 deletions
+2 -2
View File
@@ -2548,7 +2548,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
string newtoughness = "";
vector <string> abilities = split(sabilities, ',');
bool newAbilityFound = false;
vector<MTGAbility *> newAbilitiesList;
vector<string> newAbilitiesList;
storedString.erase();
storedString.append(extraTransforms);
extraTransforms.erase();
@@ -2571,7 +2571,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
newAbilityFound = true;
size_t NewSkill = abilities[j].find("[");
string newAbilities = abilities[j].substr(NewSkill + 1,abilities[j].find(']') - 1);
newAbilitiesList.push_back(parseMagicLine(newAbilities, id, spell, card));
newAbilitiesList.push_back(newAbilities.c_str());
}
}
MTGAbility * a;