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:
@@ -24,7 +24,7 @@ void DrawArrowButtons(int x, int y, Colours button_colour, byte state, bool clic
|
||||
void DrawDropDownButton(int x, int y, Colours button_colour, bool state, bool clickable);
|
||||
void DrawBoolButton(int x, int y, bool state, bool clickable);
|
||||
|
||||
DropDownList *BuildMusicSetDropDownList(int *selected_index);
|
||||
DropDownList BuildMusicSetDropDownList(int *selected_index);
|
||||
|
||||
/* Actually implemented in music_gui.cpp */
|
||||
void ChangeMusicSet(int index);
|
||||
|
Reference in New Issue
Block a user