Fix Segmentation Fault & Formatting

This commit is contained in:
Anthony Calosa
2015-11-10 11:58:36 +08:00
parent 406f68ac5b
commit cd1b629191
71 changed files with 769 additions and 769 deletions

View File

@@ -94,7 +94,7 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost, MTGCardInstan
}
//switch on the first letter. If two costs share their first letter, add an "if" within the switch
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
std::transform(value.begin(), value.end(), value.begin(), ::tolower);
switch (value[0])
{
case 'x':
@@ -695,7 +695,7 @@ ManaCostHybrid * ManaCost::getHybridCost(unsigned int i)
ExtraCost * ManaCost::getExtraCost(unsigned int i)
{
if(extraCosts && extraCosts->costs.size())
{
{
if (extraCosts->costs.size() <= i)
return NULL;
return extraCosts->costs[i];
@@ -1055,7 +1055,7 @@ ostream& operator<<(ostream& out, ManaCost m)
void ManaPool::Empty()
{
SAFE_DELETE(extraCosts);
SAFE_DELETE(extraCosts);
SAFE_DELETE(kicker);
SAFE_DELETE(alternative);
SAFE_DELETE(BuyBack);