mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 18:02:37 +01:00
Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
This commit is contained in:
@@ -219,7 +219,7 @@ static const CheatEntry _cheats_ui[] = {
|
||||
static_assert(CHT_NUM_CHEATS == lengthof(_cheats_ui));
|
||||
|
||||
/** Widget definitions of the cheat GUI. */
|
||||
static constexpr NWidgetPart _nested_cheat_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_cheat_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetStringTip(STR_CHEATS, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
||||
Reference in New Issue
Block a user