Codechange: Remove deferred nested_array initialization path. (#11640)

Having two ways (`FillNestedArray` and `SetupSmallestSize`) to initialize
`Window::nested_array` introduces confusion.

Instead, make `FillNestedArray` the canonical way, always call it, and remove
init_array from `SetupSmallestSize`.
This commit is contained in:
Peter Nelson
2023-12-29 14:27:04 +00:00
committed by GitHub
parent 11ba951250
commit feb94d233d
9 changed files with 48 additions and 83 deletions

View File

@@ -1850,13 +1850,13 @@ public:
this->smallmap_window = nullptr;
}
void SetupSmallestSize(Window *w, bool init_array) override
void SetupSmallestSize(Window *w) override
{
NWidgetBase *display = this->head;
NWidgetBase *bar = display->next;
display->SetupSmallestSize(w, init_array);
bar->SetupSmallestSize(w, init_array);
display->SetupSmallestSize(w);
bar->SetupSmallestSize(w);
this->smallmap_window = dynamic_cast<SmallMapWindow *>(w);
assert(this->smallmap_window != nullptr);