diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/industry_gui.cpp | 2 | ||||
-rw-r--r-- | src/network/network_gui.cpp | 2 | ||||
-rw-r--r-- | src/vehicle_gui.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index d8857f6e1..b6069424c 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -841,7 +841,7 @@ static void SortIndustriesList(GUIIndustryList *sl) _internal_sort_order = (sl->sort_type << 1) | (sl->flags & VL_DESC); _last_industry = NULL; // used for "cache" in namesorting - qsort((void*)sl->Begin(), sl->Length(), sizeof(sl->Begin()), &GeneralIndustrySorter); + qsort((void*)sl->Begin(), sl->Length(), sizeof(*sl->Begin()), &GeneralIndustrySorter); sl->flags &= ~VL_RESORT; } diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp index c3787e33d..5661b2f03 100644 --- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -237,7 +237,7 @@ struct NetworkGameWindow : public QueryStringBaseWindow { if (this->servers.Length() == 0) return; _internal_sort_order = !!(this->servers.flags & VL_DESC); - qsort(this->servers.Begin(), this->servers.Length(), sizeof(this->servers.Begin()), ngame_sorter[this->servers.sort_type]); + qsort(this->servers.Begin(), this->servers.Length(), sizeof(*this->servers.Begin()), ngame_sorter[this->servers.sort_type]); /* After sorting ngl->sort_list contains the sorted items. Put these back * into the original list. Basically nothing has changed, we are only diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index c0b02d823..36ee986e6 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -110,7 +110,7 @@ void SortVehicleList(VehicleListBase *vl) _last_vehicle[0] = _last_vehicle[1] = NULL; _internal_sort_order = (vl->vehicles.flags & VL_DESC) != 0; - qsort((void*)vl->vehicles.Begin(), vl->vehicles.Length(), sizeof(vl->vehicles.Begin()), + qsort((void*)vl->vehicles.Begin(), vl->vehicles.Length(), sizeof(*vl->vehicles.Begin()), _vehicle_sorter[vl->vehicles.sort_type]); vl->vehicles.resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS; @@ -121,7 +121,7 @@ void DepotSortList(VehicleList *list) { _internal_sort_order = 0; if (list->Length() < 2) return; - qsort((void*)list->Begin(), list->Length(), sizeof(list->Begin()), _vehicle_sorter[0]); + qsort((void*)list->Begin(), list->Length(), sizeof(*list->Begin()), _vehicle_sorter[0]); } /** draw the vehicle profit button in the vehicle list window. */ |