mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 19:32:54 +01:00
Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
static constexpr NWidgetPart _nested_errmsg_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_errmsg_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_RED),
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION), SetStringTip(STR_ERROR_MESSAGE_CAPTION),
|
||||
@@ -50,7 +50,7 @@ static WindowDesc _errmsg_desc(
|
||||
_nested_errmsg_widgets
|
||||
);
|
||||
|
||||
static constexpr NWidgetPart _nested_errmsg_face_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_errmsg_face_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_RED),
|
||||
NWidget(WWT_CAPTION, COLOUR_RED, WID_EM_CAPTION),
|
||||
|
||||
Reference in New Issue
Block a user