Skip to content

Commit 4d43cd8

Browse files
committed
Change Sort(Custom/Func)1D params from int to any
1 parent bb3b736 commit 4d43cd8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/include/sorting.inc

+4-4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ native void SortStrings(char[][] array, int array_size, SortOrder order = Sort_A
9595
* 0 if first is equal to second
9696
* 1 if first should go after second
9797
*/
98-
typedef SortFunc1D = function int (int elem1, int elem2, const int[] array, any data);
98+
typedef SortFunc1D = function int (any elem1, any elem2, const any[] array, any data);
9999

100100
/**
101101
* Sorts a custom 1D array. You must pass in a comparison function.
@@ -105,7 +105,7 @@ typedef SortFunc1D = function int (int elem1, int elem2, const int[] array, any
105105
* @param sortfunc Sort function.
106106
* @param data Optional Handle or value to pass through the comparison calls.
107107
*/
108-
native void SortCustom1D(int[] array, int array_size, SortFunc1D sortfunc, any data=0);
108+
native void SortCustom1D(any[] array, int array_size, SortFunc1D sortfunc, any data=0);
109109

110110
/**
111111
* Sort comparison function for 2D array elements (sub-arrays).
@@ -127,7 +127,7 @@ typedef SortFunc2D = function int (any[] elem1, any[] elem2, const any[][] array
127127
* @param array Array to sort.
128128
* @param array_size Size of the major array to sort (first index, outermost).
129129
* @param sortfunc Sort comparison function to use.
130-
* @param hndl Optional Handle to pass through the comparison calls.
130+
* @param data Optional Handle or value to pass through the comparison calls.
131131
*/
132132
native void SortCustom2D(any[][] array, int array_size, SortFunc2D sortfunc, any data=0);
133133

@@ -160,6 +160,6 @@ typedef SortFuncADTArray = function int (int index1, int index2, Handle array, a
160160
*
161161
* @param array Array Handle to sort
162162
* @param sortfunc Sort comparison function to use
163-
* @param data Optional Handle or data to pass through the comparison calls.
163+
* @param data Optional Handle or value to pass through the comparison calls.
164164
*/
165165
native void SortADTArrayCustom(Handle array, SortFuncADTArray sortfunc, any data=0);

0 commit comments

Comments
 (0)