|
|
@ -866,15 +866,13 @@ hb_stable_sort (T *array, unsigned int len, int(*compar)(const T *, const T *), |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
/* Move item i to occupy place for item j, shift what's in between. */ |
|
|
|
/* Move item i to occupy place for item j, shift what's in between. */ |
|
|
|
{ |
|
|
|
{ |
|
|
|
T t; |
|
|
|
T t = array[i]; |
|
|
|
t = array[i]; |
|
|
|
|
|
|
|
memmove (&array[j + 1], &array[j], (i - j) * sizeof (T)); |
|
|
|
memmove (&array[j + 1], &array[j], (i - j) * sizeof (T)); |
|
|
|
array[j] = t; |
|
|
|
array[j] = t; |
|
|
|
} |
|
|
|
} |
|
|
|
if (array2) |
|
|
|
if (array2) |
|
|
|
{ |
|
|
|
{ |
|
|
|
T2 t; |
|
|
|
T2 t = array2[i]; |
|
|
|
t = array2[i]; |
|
|
|
|
|
|
|
memmove (&array2[j + 1], &array2[j], (i - j) * sizeof (T2)); |
|
|
|
memmove (&array2[j + 1], &array2[j], (i - j) * sizeof (T2)); |
|
|
|
array2[j] = t; |
|
|
|
array2[j] = t; |
|
|
|
} |
|
|
|
} |
|
|
|