mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-25 08:22:17 +00:00
Codechange: Use std::initializer_list for NWidgetPart data. (#14749)
Avoids using C/C++ arrays.
This commit is contained in:
@@ -58,7 +58,7 @@ uint GetEngineListHeight(VehicleType type)
|
||||
return std::max<uint>(GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.matrix.Vertical(), GetVehicleImageCellSize(type, EIT_PURCHASE).height);
|
||||
}
|
||||
|
||||
static constexpr NWidgetPart _nested_build_vehicle_widgets[] = {
|
||||
static constexpr std::initializer_list<NWidgetPart> _nested_build_vehicle_widgets = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_BV_CAPTION), SetTextStyle(TC_WHITE),
|
||||
|
||||
Reference in New Issue
Block a user