replace atoi with std::stoi

This commit is contained in:
2024-08-08 12:40:58 -05:00
committed by Celtic Minstrel
parent f01fdb7e2a
commit a13e7cdc3b
3 changed files with 7 additions and 5 deletions

View File

@@ -264,7 +264,7 @@ void replay_next_action() {
std::string t = next_action.Value();
if(overall_mode == MODE_STARTUP && t == "startup_button_click"){
eStartButton btn = static_cast<eStartButton>(atoi(next_action.GetText().c_str()));
eStartButton btn = static_cast<eStartButton>(std::stoi(next_action.GetText()));
handle_startup_button_click(btn);
}else if(t == "load_party"){
decode_file(next_action.GetText(), tempDir / "temp.exg");
@@ -343,7 +343,7 @@ void init_boe(int argc, char* argv[]) {
Element& srand_element = pop_next_action("srand");
std::string ts(srand_element.GetText());
game_rand.seed(atoi(ts.c_str()));
game_rand.seed(std::stoi(ts));
} else {
auto t = time(nullptr);
if (recording) {