Change: Replace ScriptLog data array with std::deque. (#10770)

Due to cyclic header dependency this requires moving the data types used
by ScriptLog out of the ScriptLog class.
This commit is contained in:
PeterN
2023-05-06 15:54:58 +01:00
committed by GitHub
parent 5dd54e2708
commit b67cf7f94a
11 changed files with 107 additions and 120 deletions

View File

@@ -17,6 +17,8 @@
#include "../goal_type.h"
#include "../story_type.h"
#include "script_log_types.hpp"
#include "table/strings.h"
#include <vector>
@@ -54,7 +56,7 @@ private:
RailType rail_type; ///< The current railtype we build.
void *event_data; ///< Pointer to the event data storage.
void *log_data; ///< Pointer to the log data storage.
ScriptLogTypes::LogData log_data;///< Log data storage.
public:
ScriptStorage() :
@@ -72,8 +74,7 @@ public:
/* calback_value (can't be set) */
road_type (INVALID_ROADTYPE),
rail_type (INVALID_RAILTYPE),
event_data (nullptr),
log_data (nullptr)
event_data (nullptr)
{ }
~ScriptStorage();