From 14418fab6f0002c3146d24155542c9c44648192f Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Fri, 21 Jul 2023 13:22:31 +0800 Subject: [PATCH] tarray2: remove typeof for vs 2017 ci macros --- include/util/tarray2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/util/tarray2.h b/include/util/tarray2.h index d8d303ebc3..3f841cb006 100644 --- a/include/util/tarray2.h +++ b/include/util/tarray2.h @@ -138,13 +138,13 @@ static FORCE_INLINE int32_t tarray2SortInsert(void *arr, const void *elePtr, int #define TARRAY2_APPEND(a, e) TARRAY2_APPEND_PTR(a, &(e)) // return (TYPE *) -#define TARRAY2_SEARCH(a, ep, cmp, flag) tarray2Search(a, ep, sizeof(typeof((a)->data[0])), (__compar_fn_t)cmp, flag) +#define TARRAY2_SEARCH(a, ep, cmp, flag) tarray2Search(a, ep, sizeof(((a)->data[0])), (__compar_fn_t)cmp, flag) #define TARRAY2_SEARCH_IDX(a, ep, cmp, flag) \ tarray2SearchIdx(a, ep, sizeof(typeof((a)->data[0])), (__compar_fn_t)cmp, flag) -#define TARRAY2_SORT_INSERT(a, e, cmp) tarray2SortInsert(a, &(e), sizeof(typeof((a)->data[0])), (__compar_fn_t)cmp) -#define TARRAY2_SORT_INSERT_P(a, ep, cmp) tarray2SortInsert(a, ep, sizeof(typeof((a)->data[0])), (__compar_fn_t)cmp) +#define TARRAY2_SORT_INSERT(a, e, cmp) tarray2SortInsert(a, &(e), sizeof(((a)->data[0])), (__compar_fn_t)cmp) +#define TARRAY2_SORT_INSERT_P(a, ep, cmp) tarray2SortInsert(a, ep, sizeof(((a)->data[0])), (__compar_fn_t)cmp) #define TARRAY2_REMOVE(a, idx, cb) \ do { \ -- GitLab