mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-26 13:44:16 +01:00
Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
This commit is contained in:
@@ -84,7 +84,7 @@ static void ShowContentTextfileWindow(Window *parent, TextfileType file_type, co
|
||||
}
|
||||
|
||||
/** Nested widgets for the download window. */
|
||||
static constexpr NWidgetPart _nested_network_content_download_status_window_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_content_download_status_window_widgets = {
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_CONTENT_DOWNLOAD_TITLE, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
NWidget(WWT_PANEL, COLOUR_GREY),
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_wide, 0), SetPadding(WidgetDimensions::unscaled.modalpopup),
|
||||
@@ -1025,7 +1025,7 @@ void BuildContentTypeStringList()
|
||||
}
|
||||
|
||||
/** The widgets for the content list. */
|
||||
static constexpr NWidgetPart _nested_network_content_list_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_network_content_list_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_LIGHT_BLUE),
|
||||
NWidget(WWT_CAPTION, COLOUR_LIGHT_BLUE), SetStringTip(STR_CONTENT_TITLE),
|
||||
|
||||
Reference in New Issue
Block a user