Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate copy-free code for most situations.
This commit is contained in:
@@ -571,8 +571,7 @@ struct MusicTrackSelectionWindow : public Window {
|
||||
|
||||
case WID_MTS_MUSICSET: {
|
||||
int selected = 0;
|
||||
DropDownList *dropdown = BuildMusicSetDropDownList(&selected);
|
||||
ShowDropDownList(this, dropdown, selected, widget, 0, true, false);
|
||||
ShowDropDownList(this, BuildMusicSetDropDownList(&selected), selected, widget, 0, true, false);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user