From 781b90ac91b071f407aa32b3bbea1d94a07912b7 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Mon, 26 May 2008 16:23:23 +0000 Subject: (svn r13266) -Codechange: Use SmallVector in GUIList --- src/vehicle.cpp | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/vehicle.cpp') diff --git a/src/vehicle.cpp b/src/vehicle.cpp index f5bb940f7..54c379edd 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1334,35 +1334,6 @@ void BuildDepotVehicleList(VehicleType type, TileIndex tile, VehicleList *engine if (wagons != NULL && wagons != engines) wagons->Compact(); } -/** - * @param sort_list list to store the list in. Either NULL or the length length_of_array tells - * @param length_of_array informs the length allocated for sort_list. This is not the same as the number of vehicles in the list. Needs to be 0 when sort_list is NULL - * @param type type of vehicle - * @param owner PlayerID of owner to generate a list for - * @param index This parameter has different meanings depending on window_type - * - * @param window_type tells what kind of window the list is for. Use the VLW flags in vehicle_gui.h - * @return the number of vehicles added to the list - */ -uint GenerateVehicleSortList(const Vehicle ***sort_list, uint16 *length_of_array, VehicleType type, PlayerID owner, uint32 index, uint16 window_type) -{ - VehicleList list; - GenerateVehicleSortList(&list, type, owner, index, window_type); - - if (list.Length() > 0) { - *sort_list = ReallocT(*sort_list, list.Length()); - memcpy(*sort_list, list.Begin(), sizeof(list.Begin()) * list.Length()); - } - - return list.Length(); -} - /** * Generate a list of vehicles based on window type. * @param list Pointer to list to add vehicles to -- cgit v1.2.3-54-g00ecf