Fixed a compiling error for GCC-4.4.5.
This commit is contained in:
@@ -232,7 +232,8 @@ void TestSuiteState::parsePlayerState(int playerId, string s){
|
|||||||
unsigned int value;
|
unsigned int value;
|
||||||
limiter = s.find(",");
|
limiter = s.find(",");
|
||||||
if (limiter != string::npos){
|
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);
|
s = s.substr(limiter+1);
|
||||||
}else{
|
}else{
|
||||||
value = Rules::getMTGId(trim(s));
|
value = Rules::getMTGId(trim(s));
|
||||||
@@ -610,4 +611,4 @@ void TestSuite::pregameTests(){
|
|||||||
if(!sb.unitTest())
|
if(!sb.unitTest())
|
||||||
nbFailed++;
|
nbFailed++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user