| 873 | |
| 874 | |
| 875 | struct Sorter |
| 876 | { |
| 877 | Sorter(SorterFunc inFunc) : mFunc(inFunc) { } |
| 878 | |
| 879 | bool operator()(const ELEM_ &inA, const ELEM_ &inB) |
| 880 | { |
| 881 | #if (HXCPP_API_LEVEL>=500) |
| 882 | return mFunc(inA, inB) < 0; |
| 883 | #else |
| 884 | return mFunc( Dynamic(inA), Dynamic(inB))->__ToInt() < 0; |
| 885 | #endif |
| 886 | } |
| 887 | |
| 888 | SorterFunc mFunc; |
| 889 | }; |
| 890 | |
| 891 | inline void qsort(SorterFunc inSorter) |
| 892 | { |