1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +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

@ -275,13 +275,13 @@ void CPlayerInterface::yourTurn()
{
int index = getLastIndex(prefix + "Newgame_");
index %= SAVES_COUNT;
cb->save("Saves/" + prefix + "Newgame_Autosave_" + boost::lexical_cast<std::string>(index + 1));
cb->save("Saves/" + prefix + "Newgame_Autosave_" + std::to_string(index + 1));
}
firstCall = 0;
}
else if(frequency > 0 && cb->getDate() % frequency == 0)
{
LOCPLINT->cb->save("Saves/" + prefix + "Autosave_" + boost::lexical_cast<std::string>(autosaveCount++ + 1));
LOCPLINT->cb->save("Saves/" + prefix + "Autosave_" + std::to_string(autosaveCount++ + 1));
autosaveCount %= 5;
}