forked from mirror/OpenTTD
(svn r6652) -Feature: [depot window] depot lists are now sorted, so vehicle 1 is always first and so on
This should not be a big slowdown as it's only called each time the list is generated and will normally be much faster than the list generation itself (only a small % of the total number of vehicles is in the depot)
This commit is contained in:
@@ -158,6 +158,11 @@ static void SortVehicleList(vehiclelist_d *vl)
|
||||
vl->l.flags &= ~VL_RESORT;
|
||||
}
|
||||
|
||||
void DepotSortList(Vehicle **v, uint16 length)
|
||||
{
|
||||
_internal_sort_order = 0;
|
||||
qsort((void*)v, length, sizeof(v[0]), _vehicle_sorter[0]);
|
||||
}
|
||||
|
||||
/* General Vehicle GUI based procedures that are independent of vehicle types */
|
||||
void InitializeVehiclesGuiList(void)
|
||||
|
Reference in New Issue
Block a user