Codechange: Place gamelog into its own class, along with internal data.

Data is now stored in vectors to avoid manual memory management and
passing lengths around.
This commit is contained in:
Peter Nelson
2023-05-01 18:14:31 +01:00
committed by PeterN
parent 47a8d12f0e
commit 00bf42353a
18 changed files with 308 additions and 345 deletions

View File

@@ -28,6 +28,7 @@
#include "gamelog.h"
#include "stringfilter_type.h"
#include "misc_cmd.h"
#include "gamelog_internal.h"
#include "widgets/fios_widget.h"
@@ -41,7 +42,6 @@ LoadCheckData _load_check_data; ///< Data loaded from save during SL_LOAD_CHE
static bool _fios_path_changed;
static bool _savegame_sort_dirty;
/**
* Reset read data.
*/
@@ -60,9 +60,7 @@ void LoadCheckData::Clear()
}
companies.clear();
GamelogFree(this->gamelog_action, this->gamelog_actions);
this->gamelog_action = nullptr;
this->gamelog_actions = 0;
this->gamelog.Reset();
ClearGRFConfigList(&this->grfconfig);
}