| OpenTTD
    | 
Functions related to sorting operations. More...
#include "mem_func.hpp"Go to the source code of this file.
| Functions | |
| template<typename T > | |
| static void | QSortT (T *base, uint num, int(CDECL *comparator)(const T *, const T *), bool desc=false) | 
| Type safe qsort() | |
| template<typename T > | |
| static void | GSortT (T *base, uint num, int(CDECL *comparator)(const T *, const T *), bool desc=false) | 
| Type safe Gnome Sort. | |
Functions related to sorting operations.
Definition in file sort_func.hpp.
| 
 | inlinestatic | 
Type safe Gnome Sort.
This is a slightly modified Gnome search. The basic Gnome search tries to sort already sorted list parts. The modification skips these.
| base | Pointer to the first element of the array to be sorted. | 
| num | Number of elements in the array pointed by base. | 
| comparator | Function that compares two elements. | 
| desc | Sort descending. | 
Definition at line 52 of file sort_func.hpp.
References Swap().
Referenced by GUIList< const Sign *, StringFilter & >::Sort().
| 
 | inlinestatic | 
Type safe qsort()
| base | Pointer to the first element of the array to be sorted. | 
| num | Number of elements in the array pointed by base. | 
| comparator | Function that compares two elements. | 
| desc | Sort descending. | 
Definition at line 28 of file sort_func.hpp.
References MemReverseT().
Referenced by GameOptionsWindow::BuildDropDownList(), CmdSetTimetableStart(), CommitVehicleListOrderChanges(), DoScanNewGRFFiles(), EngList_Sort(), EngList_SortPartial(), FiosGetFileList(), InitializeSortedCargoSpecs(), InitRailTypes(), SaveHighScoreValueNetwork(), WindowDesc::SaveToConfig(), GUIList< const Sign *, StringFilter & >::Sort(), SortIndustryTypes(), and SortSaveGameList().
 1.8.1.2
 1.8.1.2