Codechange: Make all NWidgetPart arrays constexpr.
This ensures that the arrays are not created at runtime and prevents using non-constexpr values.
This commit is contained in:

committed by
Peter Nelson

parent
71b7ba0daa
commit
7737aa6640
@@ -506,7 +506,7 @@ std::unique_ptr<NWidgetBase> MakeCargoesLegendLinkGraphGUI()
|
||||
}
|
||||
|
||||
|
||||
static const NWidgetPart _nested_linkgraph_legend_widgets[] = {
|
||||
static constexpr NWidgetPart _nested_linkgraph_legend_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN, WID_LGL_CAPTION), SetDataTip(STR_LINKGRAPH_LEGEND_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
Reference in New Issue
Block a user