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
@@ -38,7 +38,7 @@
|
||||
#include "safeguards.h"
|
||||
|
||||
/** Widgets for the textfile window. */
|
||||
static const NWidgetPart _nested_textfile_widgets[] = {
|
||||
static constexpr NWidgetPart _nested_textfile_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_MAUVE),
|
||||
NWidget(WWT_PUSHARROWBTN, COLOUR_MAUVE, WID_TF_NAVBACK), SetFill(0, 1), SetMinimalSize(15, 1), SetDataTip(AWV_DECREASE, STR_TEXTFILE_NAVBACK_TOOLTIP),
|
||||
|
Reference in New Issue
Block a user