Skip to content

Commit

Permalink
Change Sort(Custom/Func)1D params from int to any
Browse files Browse the repository at this point in the history
  • Loading branch information
JoinedSenses authored Apr 10, 2022
1 parent bb3b736 commit 63e6f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/include/sorting.inc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ native void SortStrings(char[][] array, int array_size, SortOrder order = Sort_A
* 0 if first is equal to second
* 1 if first should go after second
*/
typedef SortFunc1D = function int (int elem1, int elem2, const int[] array, any data);
typedef SortFunc1D = function int (any elem1, any elem2, const any[] array, any data);

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

/**
* Sort comparison function for 2D array elements (sub-arrays).
Expand Down

0 comments on commit 63e6f81

Please sign in to comment.