Merge tag '14.0-beta2' into jgrpp
# Conflicts: # CMakeLists.txt # src/cargotype.cpp # src/console_cmds.cpp # src/graph_gui.cpp # src/industry_cmd.cpp # src/industrytype.h # src/misc_gui.cpp # src/network/network_client.cpp # src/newgrf.cpp # src/newgrf_town.cpp # src/object_cmd.cpp # src/openttd.cpp # src/pathfinder/water_regions.cpp # src/saveload/saveload.cpp # src/saveload/saveload.h # src/table/build_industry.h # src/table/engines.h # src/vehicle.cpp # src/vehicle_cmd.cpp # src/vehicle_gui.cpp
This commit is contained in:
@@ -1305,7 +1305,7 @@ static void MakeNewEditorWorld()
|
||||
* @param error_detail Optional string to fill with detaied error information.
|
||||
*/
|
||||
bool SafeLoad(const std::string &filename, SaveLoadOperation fop, DetailedFileType dft, GameMode newgm, Subdirectory subdir,
|
||||
struct LoadFilter *lf = nullptr, std::string *error_detail = nullptr)
|
||||
std::shared_ptr<struct LoadFilter> lf = nullptr, std::string *error_detail = nullptr)
|
||||
{
|
||||
assert(fop == SLO_LOAD);
|
||||
assert(dft == DFT_GAME_FILE || (lf == nullptr && dft == DFT_OLD_GAME_FILE));
|
||||
@@ -1313,7 +1313,7 @@ bool SafeLoad(const std::string &filename, SaveLoadOperation fop, DetailedFileTy
|
||||
|
||||
_game_mode = newgm;
|
||||
|
||||
SaveOrLoadResult result = (lf == nullptr) ? SaveOrLoad(filename, fop, dft, subdir) : LoadWithFilter(lf);
|
||||
SaveOrLoadResult result = (lf == nullptr) ? SaveOrLoad(filename, fop, dft, subdir) : LoadWithFilter(std::move(lf));
|
||||
if (result == SL_OK) return true;
|
||||
|
||||
if (error_detail != nullptr) *error_detail = GetSaveLoadErrorString();
|
||||
|
Reference in New Issue
Block a user