diff --git a/plugins/include/sorting.inc b/plugins/include/sorting.inc index c45d17f70c..ee777d8666 100644 --- a/plugins/include/sorting.inc +++ b/plugins/include/sorting.inc @@ -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 (any elem1, any elem2, const any[] array, Handle hndl); +typedef SortFunc1D = function int (int elem1, int elem2, const int[] array, Handle hndl); /** * Sorts a custom 1D array. You must pass in a comparison function. @@ -105,7 +105,7 @@ typedef SortFunc1D = function int (any elem1, any elem2, const any[] array, Hand * @param sortfunc Sort function. * @param hndl Optional Handle to pass through the comparison calls. */ -native void SortCustom1D(any[] array, int array_size, SortFunc1D sortfunc, Handle hndl=INVALID_HANDLE); +native void SortCustom1D(int[] array, int array_size, SortFunc1D sortfunc, Handle hndl=INVALID_HANDLE); /** * Sort comparison function for 2D array elements (sub-arrays). @@ -121,7 +121,7 @@ native void SortCustom1D(any[] array, int array_size, SortFunc1D sortfunc, Handl */ typeset SortFunc2D { - function int (any[] elem1, any[] elem2, const any[][] array, Handle hndl); + function int (int[] elem1, int[] elem2, const int[][] array, Handle hndl); function int (char[] elem1, char[] elem2, const char[][] array, Handle hndl); }; diff --git a/plugins/testsuite/mock/test_sorting.sp b/plugins/testsuite/mock/test_sorting.sp index 7e739f1aaf..a875c23ca1 100644 --- a/plugins/testsuite/mock/test_sorting.sp +++ b/plugins/testsuite/mock/test_sorting.sp @@ -105,7 +105,7 @@ void Test_Sort1D() { AssertArrayEq("SortCustom1D Integers Ascending", intArray, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, sizeof(intArray)); float floatArray[10] = {6.3, 7.6, 3.2, 2.1, 8.5, 5.2, 0.4, 1.7, 4.8, 8.2}; - SortCustom1D(floatArray, sizeof(floatArray), Custom1DSortFloat); + SortCustom1D(view_as(floatArray), sizeof(floatArray), Custom1DSortFloat); AssertArrayEq("SortCustom1D Floats Ascending", floatArray, {0.4, 1.7, 2.1, 3.2, 4.8, 5.2, 6.3, 7.6, 8.2, 8.5}, sizeof(floatArray)); } diff --git a/public/amtl b/public/amtl index e38cfe3cbf..285b4f853c 160000 --- a/public/amtl +++ b/public/amtl @@ -1 +1 @@ -Subproject commit e38cfe3cbf2047916e4a68017840bd325a8f7080 +Subproject commit 285b4f853c0003023838140113e3ec066bd800c6 diff --git a/sourcepawn b/sourcepawn index 08d4d0c8b0..d59a51b574 160000 --- a/sourcepawn +++ b/sourcepawn @@ -1 +1 @@ -Subproject commit 08d4d0c8b0a54d5778a643c6e16e1cd5b093bcc6 +Subproject commit d59a51b5741823903ecbe8c014632ee1f8aad65d