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

Class ArraySorter

src/Array.cpp:23–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 SorterFunc;
22
23 struct ArraySorter
24 {
25 ELEM* mArray;
26 SorterFunc mSorter;
27
28 ArraySorter(ELEM* inArray, SorterFunc inSorter) : mArray(inArray), mSorter(inSorter) {};
29
30 bool operator()(int inA, int inB)
31 {
32 return mSorter(mArray[inA], mArray[inB]) < 0;
33 }
34 };
35
36 template<class STORE>
37 static void SortImpl(ELEM* inArray, const int inLength, SorterFunc inSorter)

Callers 1

SortImplMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected