Revert "Update sourcepawn submodule (#2146)"
This reverts commit 1bcc5b8a44
.
This commit is contained in:
parent
1bcc5b8a44
commit
0e4b1ca4cf
@ -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);
|
||||
};
|
||||
|
||||
|
@ -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<any>(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));
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e38cfe3cbf2047916e4a68017840bd325a8f7080
|
||||
Subproject commit 285b4f853c0003023838140113e3ec066bd800c6
|
@ -1 +1 @@
|
||||
Subproject commit 08d4d0c8b0a54d5778a643c6e16e1cd5b093bcc6
|
||||
Subproject commit d59a51b5741823903ecbe8c014632ee1f8aad65d
|
Loading…
Reference in New Issue
Block a user