diff options
author | krzys-h <krzys_h@interia.pl> | 2014-09-28 19:25:28 +0200 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2014-09-28 19:25:28 +0200 |
commit | f2c6b322dd3d909fe7928a35d4744992ab17adc1 (patch) | |
tree | 5799b69148bf0e731787500da276b92a54e76e4f /src/object/robotmain.cpp | |
parent | ab5c1271c01095db4a15156f425893c5707ad579 (diff) | |
download | colobot-f2c6b322dd3d909fe7928a35d4744992ab17adc1.tar.gz colobot-f2c6b322dd3d909fe7928a35d4744992ab17adc1.tar.bz2 colobot-f2c6b322dd3d909fe7928a35d4744992ab17adc1.zip |
Replaced std::to_string with boost::lexical_cast<std::string>
MXE has problems with std::to_string
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r-- | src/object/robotmain.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 51af57c..a409aa0 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -4495,7 +4495,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) // Puts information in terminal (OBJECT_INFO). for (int i = 0; i < OBJECTMAXINFO; i++) { - std::string op = "info"+std::to_string(i+1); + std::string op = "info"+boost::lexical_cast<std::string>(i+1); if(!line->GetParam(op)->IsDefined()) break; std::string text = line->GetParam(op)->AsString(); std::size_t p = text.find_first_of("="); @@ -4568,7 +4568,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) { for (int i = 0; i < 10; i++) { - std::string op = "script"+std::to_string(i+1); // script1..script10 + std::string op = "script"+boost::lexical_cast<std::string>(i+1); // script1..script10 if(line->GetParam(op)->IsDefined()) { brain->SetScriptName(i, const_cast<char*>(line->GetParam(op)->AsPath("").c_str())); //TODO: don't make this relative to ai/ } @@ -4589,7 +4589,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) automat->SetType(type); for (int i = 0; i < 5; i++) { - std::string op = "autoValue"+std::to_string(i+1); // autoValue1..autoValue5 + std::string op = "autoValue"+boost::lexical_cast<std::string>(i+1); // autoValue1..autoValue5 automat->SetValue(i, line->GetParam(op)->AsFloat(0.0f)); } automat->SetString(const_cast<char*>(line->GetParam("autoString")->AsString("").c_str())); @@ -4860,7 +4860,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if(read[0] != 0) continue; // ignore errors when loading saevd game (TODO: don't report ones that are just not loaded when loading saved game) if(resetObject) continue; // ignore when reseting just objects (TODO: see above) - throw CLevelParserException("Unknown command: '"+line->GetCommand()+"' in "+line->GetLevel()->GetFilename()+":"+std::to_string(line->GetLineNumber())); + throw CLevelParserException("Unknown command: '"+line->GetCommand()+"' in "+line->GetLevel()->GetFilename()+":"+boost::lexical_cast<std::string>(line->GetLineNumber())); } if (read[0] == 0) |