Fixed some warnings
+ added compile flags to mute some warnings that don't have an obvious fix
This commit is contained in:
@@ -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())
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user