1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 09:22:42 +01:00

Codechange: explicitly initialise member variables of Windows

This commit is contained in:
Rubidium
2025-02-22 18:51:21 +01:00
committed by rubidium42
parent 566a5196f2
commit f69968f2bc
12 changed files with 131 additions and 152 deletions

View File

@@ -385,11 +385,11 @@ static const StringID _variety[] = {STR_VARIETY_NONE, STR_VARIETY_VERY_LOW,
static_assert(std::size(_num_inds) == ID_END);
struct GenerateLandscapeWindow : public Window {
WidgetID widget_id;
uint x;
uint y;
std::string name;
GenerateLandscapeWindowMode mode;
WidgetID widget_id{};
uint x = 0;
uint y = 0;
std::string name{};
GenerateLandscapeWindowMode mode{};
GenerateLandscapeWindow(WindowDesc &desc, WindowNumber number = 0) : Window(desc)
{
@@ -1065,7 +1065,7 @@ void StartNewGameWithoutGUI(uint32_t seed)
struct CreateScenarioWindow : public Window
{
WidgetID widget_id;
WidgetID widget_id{};
CreateScenarioWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{