mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-02 19:39:12 +00:00
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:
@@ -285,7 +285,7 @@ static std::unique_ptr<NWidgetBase> MakeTreeTypeButtons()
|
||||
return vstack;
|
||||
}
|
||||
|
||||
static const NWidgetPart _nested_build_trees_widgets[] = {
|
||||
static constexpr NWidgetPart _nested_build_trees_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_DARK_GREEN),
|
||||
NWidget(WWT_CAPTION, COLOUR_DARK_GREEN), SetDataTip(STR_PLANT_TREE_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
Reference in New Issue
Block a user