diff options
Diffstat (limited to 'src/widgets/dropdown_type.h')
-rw-r--r-- | src/widgets/dropdown_type.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/dropdown_type.h b/src/widgets/dropdown_type.h index bf8638a92..26c699f16 100644 --- a/src/widgets/dropdown_type.h +++ b/src/widgets/dropdown_type.h @@ -49,7 +49,7 @@ public: void Draw(int left, int right, int top, int bottom, bool sel, Colours bg_colour) const override; virtual StringID String() const { return this->string; } - static int CDECL NatSortFunc(const DropDownListItem * const *first, const DropDownListItem * const *second); + static int NatSortFunc(std::unique_ptr<const DropDownListItem> const &first, std::unique_ptr<const DropDownListItem> const &second); }; /** @@ -98,10 +98,10 @@ public: /** * A drop down list is a collection of drop down list items. */ -typedef AutoDeleteSmallVector<const DropDownListItem *> DropDownList; +typedef std::vector<std::unique_ptr<const DropDownListItem>> DropDownList; -void ShowDropDownListAt(Window *w, const DropDownList *list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width = false, bool instant_close = false); +void ShowDropDownListAt(Window *w, DropDownList &&list, int selected, int button, Rect wi_rect, Colours wi_colour, bool auto_width = false, bool instant_close = false); -void ShowDropDownList(Window *w, const DropDownList *list, int selected, int button, uint width = 0, bool auto_width = false, bool instant_close = false); +void ShowDropDownList(Window *w, DropDownList &&list, int selected, int button, uint width = 0, bool auto_width = false, bool instant_close = false); #endif /* WIDGETS_DROPDOWN_TYPE_H */ |