more fix
This commit is contained in:
parent
03456ce443
commit
9e8d761813
|
@ -165,7 +165,12 @@ static FORCE_INLINE int32_t tarray2SortInsert(void *arr, const void *elePtr, int
|
|||
#define TARRAY2_FOREACH_PTR_REVERSE(a, ep) \
|
||||
for (int32_t __i = (a)->size - 1; __i >= 0 && ((ep) = &(a)->data[__i], 1); __i--)
|
||||
|
||||
#define TARRAY2_SORT(a, cmp) taosSort((a)->data, (a)->size, sizeof((a)->data[0]), (__compar_fn_t)cmp)
|
||||
#define TARRAY2_SORT(a, cmp) \
|
||||
do { \
|
||||
if ((a)->size > 1) { \
|
||||
taosSort((a)->data, (a)->size, sizeof((a)->data[0]), (__compar_fn_t)cmp); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue