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 c80d21a41a
commit 8ea007df21
62 changed files with 157 additions and 157 deletions

View File

@@ -180,7 +180,7 @@ public:
}
};
static constexpr NWidgetPart _nested_performance_league_widgets[] = {
static constexpr std::initializer_list<NWidgetPart> _nested_performance_league_widgets = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN), SetStringTip(STR_COMPANY_LEAGUE_TABLE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
@@ -416,7 +416,7 @@ public:
}
};
static constexpr NWidgetPart _nested_script_league_widgets[] = {
static constexpr std::initializer_list<NWidgetPart> _nested_script_league_widgets = {
NWidget(NWID_HORIZONTAL),
NWidget(WWT_CLOSEBOX, COLOUR_BROWN),
NWidget(WWT_CAPTION, COLOUR_BROWN, WID_SLT_CAPTION),