diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-12-06 21:11:47 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-12-27 13:19:25 +0100 |
commit | 5cbb2da79434ec002831bd72b2c81f9dcd469601 (patch) | |
tree | a1b8fea79609c446e36a38796269dad6a1db45fd /src/openttd.cpp | |
parent | 65f65ad2ad8f029b99ef60e931b6d86952777610 (diff) | |
download | openttd-5cbb2da79434ec002831bd72b2c81f9dcd469601.tar.xz |
Codechange: Even more std::string usage in file IO.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |