Codechange: Use begin/end of nwidget parts of begin/length.
This simplifies processing nwidget parts as, unlike the remaining length, the pointer to the end of the list never changes. This is the same principle as we use(d) for tracking end instead of length for C-style strings. And this removes 160~ instances of the lengthof() macro.
This commit is contained in:
@@ -645,7 +645,7 @@ static WindowDesc _music_track_selection_desc(
|
||||
WDP_AUTO, nullptr, 0, 0,
|
||||
WC_MUSIC_TRACK_SELECTION, WC_NONE,
|
||||
0,
|
||||
_nested_music_track_selection_widgets, lengthof(_nested_music_track_selection_widgets)
|
||||
std::begin(_nested_music_track_selection_widgets), std::end(_nested_music_track_selection_widgets)
|
||||
);
|
||||
|
||||
static void ShowMusicTrackSelection()
|
||||
@@ -905,7 +905,7 @@ static WindowDesc _music_window_desc(
|
||||
WDP_AUTO, "music", 0, 0,
|
||||
WC_MUSIC_WINDOW, WC_NONE,
|
||||
0,
|
||||
_nested_music_window_widgets, lengthof(_nested_music_window_widgets)
|
||||
std::begin(_nested_music_window_widgets), std::end(_nested_music_window_widgets)
|
||||
);
|
||||
|
||||
void ShowMusicWindow()
|
||||
|
Reference in New Issue
Block a user