1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 02:12:37 +01:00

Codechange: remove ZeroedMemoryAllocator from NWidgetBase

This commit is contained in:
Rubidium
2025-02-22 12:07:17 +01:00
committed by rubidium42
parent bb4ac915ff
commit 5cee804f98
8 changed files with 88 additions and 115 deletions

View File

@@ -1561,16 +1561,15 @@ public:
static const uint MAX_EXTRA_INFO_WIDTH; ///< Maximal additional width given to the panel.
static const uint MIN_EXTRA_FOR_3_COLUMNS; ///< Minimal additional width needed before switching to 3 columns.
std::unique_ptr<NWidgetBase> avs; ///< Widget with the available grfs list and buttons.
std::unique_ptr<NWidgetBase> acs; ///< Widget with the active grfs list and buttons.
std::unique_ptr<NWidgetBase> inf; ///< Info panel.
bool editable; ///< Editable status of the parent NewGRF window (if \c false, drop all widgets that make the window editable).
std::unique_ptr<NWidgetBase> avs{}; ///< Widget with the available grfs list and buttons.
std::unique_ptr<NWidgetBase> acs{}; ///< Widget with the active grfs list and buttons.
std::unique_ptr<NWidgetBase> inf{}; ///< Info panel.
bool editable = true; ///< Editable status of the parent NewGRF window (if \c false, drop all widgets that make the window editable).
NWidgetNewGRFDisplay(std::unique_ptr<NWidgetBase> &&avs, std::unique_ptr<NWidgetBase> &&acs, std::unique_ptr<NWidgetBase> &&inf) : NWidgetBase(NWID_CUSTOM)
, avs(std::move(avs))
, acs(std::move(acs))
, inf(std::move(inf))
, editable(true) // Temporary setting, 'real' value is set in SetupSmallestSize().
{
}