equal
deleted
inserted
replaced
115 |
115 |
116 vl->vehicles.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; |
116 vl->vehicles.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; |
117 vl->vehicles.flags &= ~VL_RESORT; |
117 vl->vehicles.flags &= ~VL_RESORT; |
118 } |
118 } |
119 |
119 |
120 void DepotSortList(Vehicle **v, uint16 length) |
120 void DepotSortList(VehicleList *list) |
121 { |
121 { |
122 _internal_sort_order = 0; |
122 _internal_sort_order = 0; |
123 qsort((void*)v, length, sizeof(v[0]), _vehicle_sorter[0]); |
123 if (list->Length() < 2) return; |
|
124 qsort((void*)list->Begin(), list->Length(), sizeof(list->Begin()), _vehicle_sorter[0]); |
124 } |
125 } |
125 |
126 |
126 /** draw the vehicle profit button in the vehicle list window. */ |
127 /** draw the vehicle profit button in the vehicle list window. */ |
127 void DrawVehicleProfitButton(const Vehicle *v, int x, int y) |
128 void DrawVehicleProfitButton(const Vehicle *v, int x, int y) |
128 { |
129 { |