1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 17:32:45 +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

@@ -38,7 +38,7 @@ enum GoalColumn : uint8_t {
/** Window for displaying goals. */
struct GoalListWindow : public Window {
Scrollbar *vscroll; ///< Reference to the scrollbar widget.
Scrollbar *vscroll = nullptr; ///< Reference to the scrollbar widget.
GoalListWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
@@ -319,10 +319,10 @@ void ShowGoalsList(CompanyID company)
/** Ask a question about a goal. */
struct GoalQuestionWindow : public Window {
std::string question; ///< Question to ask (private copy).
int buttons; ///< Number of valid buttons in #button.
int button[3]; ///< Buttons to display.
TextColour colour; ///< Colour of the question text.
std::string question{}; ///< Question to ask (private copy).
int buttons = 0; ///< Number of valid buttons in #button.
std::array<int, 3> button{}; ///< Buttons to display.
TextColour colour{}; ///< Colour of the question text.
GoalQuestionWindow(WindowDesc &desc, WindowNumber window_number, TextColour colour, uint32_t button_mask, const std::string &question) : Window(desc), colour(colour)
{