1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

vcmi: reduce boost::lexical_cast usage

This commit is contained in:
Konstantin
2023-03-09 16:36:46 +03:00
parent 010c548dc1
commit 5366f9190e
36 changed files with 146 additions and 146 deletions

View File

@@ -47,7 +47,7 @@ std::string AbstractGoal::toString() const //TODO: virtualize
switch(goalType)
{
case COLLECT_RES:
desc = "COLLECT RESOURCE " + GameConstants::RESOURCE_NAMES[resID] + " (" + boost::lexical_cast<std::string>(value) + ")";
desc = "COLLECT RESOURCE " + GameConstants::RESOURCE_NAMES[resID] + " (" + std::to_string(value) + ")";
break;
case TRADE:
{
@@ -66,7 +66,7 @@ std::string AbstractGoal::toString() const //TODO: virtualize
desc = "DIG AT TILE " + tile.toString();
break;
default:
return boost::lexical_cast<std::string>(goalType);
return std::to_string(goalType);
}
if(hero.get(true)) //FIXME: used to crash when we lost hero and failed goal
desc += " (" + hero->getNameTranslated() + ")";