Codechange: make some saveload functions work natively with std::string_view
This commit is contained in:
@@ -2889,7 +2889,7 @@ static std::pair<const SaveLoadFormat &, uint8_t> GetSavegameFormat(const std::s
|
||||
/* actual loader/saver function */
|
||||
void InitializeGame(uint size_x, uint size_y, bool reset_date, bool reset_settings);
|
||||
extern bool AfterLoadGame();
|
||||
extern bool LoadOldSaveGame(const std::string &file);
|
||||
extern bool LoadOldSaveGame(std::string_view file);
|
||||
|
||||
/**
|
||||
* Reset all settings to their default, so any settings missing in the savegame
|
||||
@@ -3250,7 +3250,7 @@ SaveOrLoadResult LoadWithFilter(std::shared_ptr<LoadFilter> reader)
|
||||
* @param threaded True when threaded saving is allowed
|
||||
* @return Return the result of the action. #SL_OK, #SL_ERROR, or #SL_REINIT ("unload" the game)
|
||||
*/
|
||||
SaveOrLoadResult SaveOrLoad(const std::string &filename, SaveLoadOperation fop, DetailedFileType dft, Subdirectory sb, bool threaded)
|
||||
SaveOrLoadResult SaveOrLoad(std::string_view filename, SaveLoadOperation fop, DetailedFileType dft, Subdirectory sb, bool threaded)
|
||||
{
|
||||
/* An instance of saving is already active, so don't go saving again */
|
||||
if (_sl.saveinprogress && fop == SLO_SAVE && dft == DFT_GAME_FILE && threaded) {
|
||||
|
||||
Reference in New Issue
Block a user