Codechange: use std::string instead of stredup for saveload error messages

This commit is contained in:
Rubidium
2023-04-30 21:46:49 +02:00
committed by rubidium42
parent 8665404fe0
commit 1f3b7e2efd
5 changed files with 13 additions and 16 deletions

View File

@@ -32,7 +32,7 @@ typedef SmallMap<uint, CompanyProperties *> CompanyPropertiesMap;
struct LoadCheckData {
bool checkable; ///< True if the savegame could be checked by SL_LOAD_CHECK. (Old savegames are not checkable.)
StringID error; ///< Error message from loading. INVALID_STRING_ID if no error.
char *error_data; ///< Data to pass to SetDParamStr when displaying #error.
std::string error_msg; ///< Data to pass to SetDParamStr when displaying #error.
uint32 map_size_x, map_size_y;
TimerGameCalendar::Date current_date;
@@ -47,7 +47,7 @@ struct LoadCheckData {
struct LoggedAction *gamelog_action; ///< Gamelog actions
uint gamelog_actions; ///< Number of gamelog actions
LoadCheckData() : error_data(nullptr), grfconfig(nullptr),
LoadCheckData() : grfconfig(nullptr),
grf_compatibility(GLC_NOT_FOUND), gamelog_action(nullptr), gamelog_actions(0)
{
this->Clear();