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
@@ -630,7 +630,7 @@ struct MusicTrackSelectionWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_music_track_selection_widgets[] = {
|
||||
static constexpr NWidgetPart _nested_music_track_selection_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY, WID_MTS_CAPTION), SetDataTip(STR_PLAYLIST_MUSIC_SELECTION_SETNAME, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
@@ -862,7 +862,7 @@ struct MusicWindow : public Window {
|
||||
}
|
||||
};
|
||||
|
||||
static const NWidgetPart _nested_music_window_widgets[] = {
|
||||
static constexpr NWidgetPart _nested_music_window_widgets[] = {
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_CLOSEBOX, COLOUR_GREY),
|
||||
NWidget(WWT_CAPTION, COLOUR_GREY), SetDataTip(STR_MUSIC_JAZZ_JUKEBOX_CAPTION, STR_TOOLTIP_WINDOW_TITLE_DRAG_THIS),
|
||||
|
Reference in New Issue
Block a user