Codechange: explicitly initialise member variables of Windows

This commit is contained in:
Rubidium
2025-02-22 20:52:38 +01:00
committed by rubidium42
parent 8813a798e7
commit fd8c33d051
8 changed files with 74 additions and 84 deletions
+3 -3
View File
@@ -88,8 +88,8 @@ class BuildTreesWindow : public Window
PM_FOREST_LG,
};
int tree_to_plant; ///< Tree number to plant, \c TREE_INVALID for a random tree.
PlantingMode mode; ///< Current mode for planting
int tree_to_plant = -1; ///< Tree number to plant, \c TREE_INVALID for a random tree.
PlantingMode mode = PM_NORMAL; ///< Current mode for planting
/**
* Update the GUI and enable/disable planting to reflect selected options.
@@ -139,7 +139,7 @@ class BuildTreesWindow : public Window
}
public:
BuildTreesWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc), tree_to_plant(-1), mode(PM_NORMAL)
BuildTreesWindow(WindowDesc &desc, WindowNumber window_number) : Window(desc)
{
this->CreateNestedTree();
ResetObjectToPlace();