J :
* Fix a few warnings.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
const char * const MTG_LAND_TEXTS[] = {"artifact","forest","island","mountain","swamp","plains","other lands"};
|
||||
|
||||
AIPlayer::AIPlayer(MTGPlayerCards * _deck, char * file): Player(_deck, file){
|
||||
AIPlayer::AIPlayer(MTGPlayerCards * _deck, string file): Player(_deck, file){
|
||||
potentialMana = NEW ManaCost();
|
||||
nextCardToPlay = NULL;
|
||||
stats = NULL;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "../include/CardGui.h"
|
||||
#include "../include/MTGDeck.h"
|
||||
|
||||
int AbilityFactory::destroyAllFromTypeInPlay(char * type, MTGCardInstance * source, int bury){
|
||||
int AbilityFactory::destroyAllFromTypeInPlay(const char * type, MTGCardInstance * source, int bury){
|
||||
GameObserver * game = GameObserver::GetInstance();
|
||||
for (int i = 0; i < 2 ; i++){
|
||||
for (int j = 0; j < game->players[i]->game->inPlay->nb_cards; j++){
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
|
||||
Player::Player(MTGPlayerCards * _deck, char * file): Damageable(20){
|
||||
Player::Player(MTGPlayerCards * _deck, string file): Damageable(20){
|
||||
deckFile = file;
|
||||
game = _deck;
|
||||
game->setOwner(this);
|
||||
@@ -82,4 +82,4 @@ int Player::afterDamage(){
|
||||
void Player::cleanupPhase(){
|
||||
game->inPlay->cleanupPhase();
|
||||
game->graveyard->cleanupPhase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ TargetChooser * TargetChooserFactory::createTargetChooser(string s, MTGCardInsta
|
||||
#endif
|
||||
cd = NEW CardDescriptor();
|
||||
while(attributes.size()){
|
||||
int found2 = attributes.find(";");
|
||||
unsigned int found2 = attributes.find(";");
|
||||
string attribute;
|
||||
if (found2 != string::npos){
|
||||
attribute = attributes.substr(0,found2);
|
||||
|
||||
@@ -33,7 +33,7 @@ MTGCardInstance * TestSuite::getCardByMTGId(int mtgid){
|
||||
Interruptible * TestSuite::getActionByMTGId(int mtgid){
|
||||
ActionStack * as= GameObserver::GetInstance()->mLayers->stackLayer();
|
||||
Interruptible * action = NULL;
|
||||
while (action = as->getNext(action,0,0,1)){
|
||||
while ((action = as->getNext(action,0,0,1))){
|
||||
if (action->source && action->source->getMTGId() == mtgid){
|
||||
return action;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ TestSuiteState::TestSuiteState(){
|
||||
}
|
||||
|
||||
void TestSuiteState::parsePlayerState(int playerId, string s){
|
||||
int limiter = s.find(":");
|
||||
unsigned int limiter = s.find(":");
|
||||
string areaS;
|
||||
int area;
|
||||
if (limiter != string::npos){
|
||||
@@ -148,10 +148,12 @@ void TestSuiteState::parsePlayerState(int playerId, string s){
|
||||
SAFE_DELETE(playerData[playerId].manapool);
|
||||
playerData[playerId].manapool = ManaCost::parseManaCost(s.substr(limiter+1));
|
||||
return;
|
||||
}else{
|
||||
return; // ERROR
|
||||
}
|
||||
s = s.substr(limiter+1);
|
||||
while (s.size()){
|
||||
int value;
|
||||
unsigned int value;
|
||||
limiter = s.find(",");
|
||||
if (limiter != string::npos){
|
||||
value = atoi(s.substr(0,limiter).c_str());
|
||||
|
||||
Reference in New Issue
Block a user