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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user