summaryrefslogtreecommitdiff
path: root/src/vehicle_gui_base.h
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2019-04-02 21:31:24 +0200
committerMichael Lutz <michi@icosahedron.de>2019-04-09 22:45:15 +0200
commitc7b9987d081ae4e0103309b18c93deecc395dec9 (patch)
treee5b1f9553d6399e2eed9c05a2d91673205f9c912 /src/vehicle_gui_base.h
parentd3e113eb5f618ce0174fa0dfa2591cb96e999350 (diff)
downloadopenttd-c7b9987d081ae4e0103309b18c93deecc395dec9.tar.xz
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.
Diffstat (limited to 'src/vehicle_gui_base.h')
-rw-r--r--src/vehicle_gui_base.h2
1 files changed, 1 insertions, 1 deletions
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);