From 5cbb2da79434ec002831bd72b2c81f9dcd469601 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 6 Dec 2020 21:11:47 +0100 Subject: Codechange: Even more std::string usage in file IO. --- src/openttd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/openttd.cpp') diff --git a/src/openttd.cpp b/src/openttd.cpp index 3e1b36cd8..aa98da726 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -968,7 +968,7 @@ bool SafeLoad(const std::string &filename, SaveLoadOperation fop, DetailedFileTy _game_mode = newgm; - switch (lf == nullptr ? SaveOrLoad(filename.c_str(), fop, dft, subdir) : LoadWithFilter(lf)) { + switch (lf == nullptr ? SaveOrLoad(filename, fop, dft, subdir) : LoadWithFilter(lf)) { case SL_OK: return true; case SL_REINIT: @@ -1127,7 +1127,7 @@ void SwitchToMode(SwitchMode new_mode) case SM_SAVE_GAME: // Save game. /* Make network saved games on pause compatible to singleplayer */ - if (SaveOrLoad(_file_to_saveload.name.c_str(), SLO_SAVE, DFT_GAME_FILE, NO_DIRECTORY) != SL_OK) { + if (SaveOrLoad(_file_to_saveload.name, SLO_SAVE, DFT_GAME_FILE, NO_DIRECTORY) != SL_OK) { SetDParamStr(0, GetSaveLoadErrorString()); ShowErrorMessage(STR_JUST_RAW_STRING, INVALID_STRING_ID, WL_ERROR); } else { -- cgit v1.2.3-54-g00ecf