File diff r23552:91d98b9489aa → r23553:9f01781fc43d
src/core/sort_func.hpp
Show inline comments
 
@@ -22,13 +22,13 @@
 
 * @param base Pointer to the first element of the array to be sorted.
 
 * @param num Number of elements in the array pointed by base.
 
 * @param comparator Function that compares two elements.
 
 * @param desc Sort descending.
 
 */
 
template <typename T>
 
static inline void QSortT(T *base, uint num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
 
static inline void QSortT(T *base, size_t num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
 
{
 
	if (num < 2) return;
 

	
 
	qsort(base, num, sizeof(T), (int (CDECL *)(const void *, const void *))comparator);
 

	
 
	if (desc) MemReverseT(base, num);
 
@@ -46,13 +46,13 @@ static inline void QSortT(T *base, uint 
 
 * @param base Pointer to the first element of the array to be sorted.
 
 * @param num Number of elements in the array pointed by base.
 
 * @param comparator Function that compares two elements.
 
 * @param desc Sort descending.
 
 */
 
template <typename T>
 
static inline void GSortT(T *base, uint num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
 
static inline void GSortT(T *base, size_t num, int (CDECL *comparator)(const T*, const T*), bool desc = false)
 
{
 
	if (num < 2) return;
 

	
 
	assert(base != NULL);
 
	assert(comparator != NULL);