1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

Zero-initialize all command arguments

This commit is contained in:
Hielke Morsink
2022-06-21 22:48:29 +02:00
parent 6a017ac761
commit 8e439b9895
7 changed files with 8 additions and 8 deletions

View File

@@ -24,8 +24,8 @@ namespace OpenRCT2::Title
struct
{
EntityId SpriteIndex;
utf8 SpriteName[USER_STRING_MAX_LENGTH];
EntityId SpriteIndex{ EntityId::GetNull() };
utf8 SpriteName[USER_STRING_MAX_LENGTH]{};
} Follow;
int16_t operator()(int16_t timer);

View File

@@ -18,7 +18,7 @@ namespace OpenRCT2::Title
static constexpr const char* Name = "Load Park Command";
static constexpr const char* ScriptingName = "load";
uint8_t SaveIndex;
uint8_t SaveIndex{};
int16_t operator()(int16_t timer);
};

View File

@@ -22,7 +22,7 @@ namespace OpenRCT2::Title
static constexpr const char* Name = "Load Scenario Command";
static constexpr const char* ScriptingName = "loadsc";
utf8 Scenario[TITLE_COMMAND_SCENARIO_LENGTH];
utf8 Scenario[TITLE_COMMAND_SCENARIO_LENGTH]{};
int16_t operator()(int16_t timer);
};

View File

@@ -18,7 +18,7 @@ namespace OpenRCT2::Title
static constexpr const char* Name = "Rotate View Command";
static constexpr const char* ScriptingName = "rotate";
uint8_t Rotations;
uint8_t Rotations{};
int16_t operator()(int16_t timer);
};

View File

@@ -18,7 +18,7 @@ namespace OpenRCT2::Title
static constexpr const char* Name = "Set Speed Command";
static constexpr const char* ScriptingName = "speed";
uint8_t Speed;
uint8_t Speed{};
int16_t operator()(int16_t timer);
};

View File

@@ -19,7 +19,7 @@ namespace OpenRCT2::Title
static constexpr const char* ScriptingName = "zoom";
// TODO: Use ZoomLevel instead
uint8_t Zoom;
uint8_t Zoom{};
int16_t operator()(int16_t timer);
};

View File

@@ -18,7 +18,7 @@ namespace OpenRCT2::Title
static constexpr const char* Name = "Wait Command";
static constexpr const char* ScriptingName = "wait";
uint16_t Milliseconds;
uint16_t Milliseconds{};
int16_t operator()(int16_t timer);
};