J :
* Fix warnings
This commit is contained in:
@@ -15,7 +15,7 @@ class ManaCost{
|
||||
protected:
|
||||
int cost[Constants::MTG_NB_COLORS+1];
|
||||
ManaCostHybrid * hybrids[10];
|
||||
int nbhybrids;
|
||||
unsigned int nbhybrids;
|
||||
|
||||
public:
|
||||
ExtraCosts * extraCosts;
|
||||
|
||||
@@ -67,7 +67,7 @@ ExtraCosts::ExtraCosts(){
|
||||
|
||||
void ExtraCosts::Render(){
|
||||
//TODO cool window and stuff...
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
for (size_t i = 0; i < costs.size(); i++){
|
||||
costs[i]->Render();
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ void ExtraCosts::Render(){
|
||||
int ExtraCosts::setAction(MTGAbility * _action, MTGCardInstance * _card){
|
||||
action = _action;
|
||||
source = _card;
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
for (size_t i = 0; i < costs.size(); i++){
|
||||
costs[i]->setSource(_card);
|
||||
}
|
||||
return 1;
|
||||
@@ -89,14 +89,14 @@ int ExtraCosts::reset(){
|
||||
}
|
||||
|
||||
int ExtraCosts::tryToSetPayment(MTGCardInstance * card){
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
for (size_t i = 0; i < costs.size(); i++){
|
||||
if (int result = costs[i]->setPayment(card)) return result;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ExtraCosts::isPaymentSet(){
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
for (size_t i = 0; i < costs.size(); i++){
|
||||
if (!costs[i]->isPaymentSet()) return 0;
|
||||
}
|
||||
return 1;
|
||||
@@ -104,7 +104,7 @@ int ExtraCosts::isPaymentSet(){
|
||||
|
||||
int ExtraCosts::doPay(){
|
||||
int result = 0;
|
||||
for (int i=0; i < costs.size(); i++){
|
||||
for (size_t i = 0; i < costs.size(); i++){
|
||||
result+=costs[i]->doPay();
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -59,8 +59,8 @@ ManaCost * ManaCost::parseManaCost(string s, ManaCost * _manaCost){
|
||||
OutputDebugString("Sacrifice\n");
|
||||
TargetChooserFactory tcf;
|
||||
TargetChooser * tc = NULL;
|
||||
int target_start = value.find("(");
|
||||
int target_end = value.find(")");
|
||||
size_t target_start = value.find("(");
|
||||
size_t target_end = value.find(")");
|
||||
if (target_start!=string::npos && target_end!=string::npos){
|
||||
string target = value.substr(target_start+1, target_end-1 - target_start);
|
||||
tc = tcf.createTargetChooser(target,NULL);
|
||||
|
||||
Reference in New Issue
Block a user