Codechange: Use std::initializer_list for NWidgetPart data. (#14749)

Avoids using C/C++ arrays.
This commit is contained in:
Peter Nelson
2025-11-01 22:33:00 +00:00
committed by dP
parent 49dd74ea89
commit c2d92433c6
62 changed files with 160 additions and 158 deletions

View File

@@ -61,7 +61,7 @@ std::unique_ptr<DropDownListItem> MakeDropDownListCheckedItem(bool checked, Stri
return std::make_unique<DropDownListCheckedItem>(indent, checked, GetString(str), value, masked, shaded);
}
static constexpr NWidgetPart _nested_dropdown_menu_widgets[] = {
static constexpr std::initializer_list<NWidgetPart> _nested_dropdown_menu_widgets = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_PANEL, COLOUR_END, WID_DM_ITEMS), SetScrollbar(WID_DM_SCROLL), EndContainer(),
NWidget(NWID_SELECTION, INVALID_COLOUR, WID_DM_SHOW_SCROLL),