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:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Michael Lutz
					Michael Lutz