MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Sorter

Class Sorter

include/Array.h:875–889  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 2

qsortFunction · 0.85
sortFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected