J :
* Fixes for compilation on 64-bit architectures : string position-returning functions return size_t, not uint. Fix that. * Fixes warnings with new gcc about non-fixed string AND no arguments. NOTE : 64-bit architectures still do not compile. There are 2 different places where printf is used with a specifier that is not large enough on 64-bit because size_t is now a ulong and not a uint. The solution on GNU systems is the %zu specifier, but as I'm not sure it is supported on windows I don't want to introduce a huge hard-to-notice bug, so I'll do it at a time when I got a windowser to back me up.
This commit is contained in:
@@ -31,7 +31,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
found = s.find("player");
|
||||
if (found != string::npos){
|
||||
int maxtargets = 1;
|
||||
unsigned int several = s.find_first_of('s',5);
|
||||
size_t several = s.find_first_of('s',5);
|
||||
if (several != string::npos) maxtargets = -1;
|
||||
found = s.find("creature");
|
||||
if (found != string::npos) return NEW DamageableTargetChooser(card,maxtargets,other); //Any Damageable target (player, creature)
|
||||
@@ -106,7 +106,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
string attributes = typeName.substr(found+1,end-found-1);
|
||||
cd = NEW CardDescriptor();
|
||||
while(attributes.size()){
|
||||
unsigned int found2 = attributes.find(";");
|
||||
size_t found2 = attributes.find(";");
|
||||
string attribute;
|
||||
if (found2 != string::npos){
|
||||
cd->mode = CD_OR;
|
||||
@@ -736,4 +736,4 @@ bool DamageTargetChooser::canTarget(Targetable * target){
|
||||
DamageTargetChooser* DamageTargetChooser::clone() const{
|
||||
DamageTargetChooser * a = NEW DamageTargetChooser(*this);
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user