Introduce a typedef keyword.

This commit is contained in:
David Anderson
2014-08-03 21:51:34 -07:00
parent 09edda93ad
commit ad376ff0b8
20 changed files with 172 additions and 47 deletions
+3 -3
View File
@@ -98,7 +98,7 @@ native SortStrings(String:array[][], array_size, SortOrder:order = Sort_Ascendin
* 0 if first is equal to second
* 1 if first should go after second
*/
functag public int SortFunc1D(elem1, elem2, const 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.
@@ -163,7 +163,7 @@ native SortADTArray(Handle:array, SortOrder:order, SortType:type);
* 0 if first is equal to second
* 1 if first should go after second
*/
functag public int SortFuncADTArray(index1, index2, Handle:array, Handle:hndl);
typedef SortFuncADTArray = function int (int index1, int index2, Handle array, Handle hndl);
/**
* Custom sorts an ADT Array. You must pass in a comparison function.
@@ -173,4 +173,4 @@ functag public int SortFuncADTArray(index1, index2, Handle:array, Handle:hndl);
* @param hndl Optional Handle to pass through the comparison calls.
* @noreturn
*/
native SortADTArrayCustom(Handle:array, SortFuncADTArray:sortfunc, Handle:hndl=INVALID_HANDLE);
native SortADTArrayCustom(Handle:array, SortFuncADTArray:sortfunc, Handle:hndl=INVALID_HANDLE);