fix invalid tag value
This commit is contained in:
parent
27003dfaa5
commit
aa20dfffe1
|
@ -468,12 +468,11 @@ static int32_t taosArrayPartition(SArray* pArray, int32_t i, int32_t j, __ext_co
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void taosArrayQuicksortHelper(SArray* pArray, int32_t low, int32_t high, __ext_compar_fn_t fn,
|
static void taosArrayQuicksortImpl(SArray* pArray, int32_t low, int32_t high, __ext_compar_fn_t fn, const void* param) {
|
||||||
const void* param) {
|
|
||||||
if (low < high) {
|
if (low < high) {
|
||||||
int32_t idx = taosArrayPartition(pArray, low, high, fn, param);
|
int32_t idx = taosArrayPartition(pArray, low, high, fn, param);
|
||||||
taosArrayQuicksortHelper(pArray, low, idx - 1, fn, param);
|
taosArrayQuicksortImpl(pArray, low, idx - 1, fn, param);
|
||||||
taosArrayQuicksortHelper(pArray, idx + 1, high, fn, param);
|
taosArrayQuicksortImpl(pArray, idx + 1, high, fn, param);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +480,7 @@ static void taosArrayQuickSort(SArray* pArray, __ext_compar_fn_t fn, const void*
|
||||||
if (pArray->size <= 1) {
|
if (pArray->size <= 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
taosArrayQuicksortHelper(pArray, 0, (int32_t)(taosArrayGetSize(pArray) - 1), fn, param);
|
taosArrayQuicksortImpl(pArray, 0, (int32_t)(taosArrayGetSize(pArray) - 1), fn, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void taosArrayInsertSort(SArray* pArray, __ext_compar_fn_t fn, const void* param) {
|
static void taosArrayInsertSort(SArray* pArray, __ext_compar_fn_t fn, const void* param) {
|
||||||
|
|
Loading…
Reference in New Issue