Fixed some warnings

+ added compile flags to mute some warnings that don't have an obvious fix
This commit is contained in:
pankdm
2013-09-16 17:42:07 +00:00
parent 3c3fcfc655
commit 4aa5dec51a
4 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -2962,7 +2962,8 @@ int AARemoveMana::resolve()
if (player->doesntEmpty->getConvertedCost() && !player->poolDoesntEmpty->getConvertedCost()) if (player->doesntEmpty->getConvertedCost() && !player->poolDoesntEmpty->getConvertedCost())
{ {
ManaCost * toRemove = manaPool->Diff(player->doesntEmpty); ManaCost * toRemove = manaPool->Diff(player->doesntEmpty);
player->getManaPool()->pay(manaPool->Diff(player->doesntEmpty)); player->getManaPool()->pay(toRemove);
delete(toRemove);
return 1; return 1;
} }
else if(!player->doesntEmpty->getConvertedCost() && player->poolDoesntEmpty->getConvertedCost()) else if(!player->doesntEmpty->getConvertedCost() && player->poolDoesntEmpty->getConvertedCost())
-1
View File
@@ -96,7 +96,6 @@ int extraManaCost::isPaymentSet()
int extraManaCost::canPay() int extraManaCost::canPay()
{ {
MTGCardInstance * _target = (MTGCardInstance *) target;
if(!source->controller()->getManaPool()->canAfford(costToPay)) if(!source->controller()->getManaPool()->canAfford(costToPay))
{ {
return 0; return 0;
-2
View File
@@ -1462,7 +1462,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
vector<string> splitMayPay = parseBetween(s, "pay(", ")", true); vector<string> splitMayPay = parseBetween(s, "pay(", ")", true);
if(splitMayPay.size()) if(splitMayPay.size())
{ {
MTGAbility * a1 = NULL;
GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPay[1],storedPayString); GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPay[1],storedPayString);
a->oneShot = 1; a->oneShot = 1;
a->canBeInterrupted = false; a->canBeInterrupted = false;
@@ -1967,7 +1966,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
vector<string> splitMayPaysub = parseBetween(s, "pay[[","]]", true); vector<string> splitMayPaysub = parseBetween(s, "pay[[","]]", true);
if(splitMayPaysub.size()) if(splitMayPaysub.size())
{ {
MTGAbility * a1 = NULL;
GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPaysub[1],storedPayString); GenericPaidAbility * a = NEW GenericPaidAbility(observer, id, card, target,newName,castRestriction,splitMayPaysub[1],storedPayString);
a->oneShot = 1; a->oneShot = 1;
a->canBeInterrupted = false; a->canBeInterrupted = false;
+3
View File
@@ -12,6 +12,9 @@ TEMPLATE = app
#!macx:CONFIG += precompile_header #!macx:CONFIG += precompile_header
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter unix|macx:QMAKE_CXXFLAGS += -Wno-unused-parameter
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-but-set-parameter
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-but-set-variable
unix|macx:QMAKE_CXXFLAGS += -Wno-unused-value
unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror
windows:DEFINES += _CRT_SECURE_NO_WARNINGS windows:DEFINES += _CRT_SECURE_NO_WARNINGS
unix|macx:DEFINES += LINUX unix|macx:DEFINES += LINUX