From c7b9987d081ae4e0103309b18c93deecc395dec9 Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Tue, 2 Apr 2019 21:31:24 +0200 Subject: 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. --- src/vehicle_gui_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vehicle_gui_base.h') diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index 5755c7fa8..8e7527841 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -47,7 +47,7 @@ struct BaseVehicleListWindow : public Window { void SortVehicleList(); void BuildVehicleList(); Dimension GetActionDropdownSize(bool show_autoreplace, bool show_group); - DropDownList *BuildActionDropdownList(bool show_autoreplace, bool show_group); + DropDownList BuildActionDropdownList(bool show_autoreplace, bool show_group); }; uint GetVehicleListHeight(VehicleType type, uint divisor = 1); -- cgit v1.2.3-54-g00ecf