Fixed a compiling error for GCC-4.4.5.

This commit is contained in:
linshier
2010-11-09 02:57:52 +00:00
parent 09f01a9eae
commit 17c358cb12

View File

@@ -232,7 +232,8 @@ void TestSuiteState::parsePlayerState(int playerId, string s){
unsigned int value;
limiter = s.find(",");
if (limiter != string::npos){
value = Rules::getMTGId(trim(s.substr(0,limiter)));
string ss = s.substr(0,limiter); // ss is needed because trim requires a non-const reference,
value = Rules::getMTGId(trim(ss)); // while in g++ functions cannot take non-const references from temporary values
s = s.substr(limiter+1);
}else{
value = Rules::getMTGId(trim(s));
@@ -610,4 +611,4 @@ void TestSuite::pregameTests(){
if(!sb.unitTest())
nbFailed++;
}
}
}