Simplify code for SET (since EQUAL returns TRUE as an EMPTY method)
This commit is contained in:
1 parent
bc39034f6d
commit
8b71064643
1 file changed
+2
-7
@@ -612,17 +612,11 @@
|
|||||||
!M_C(name, _end_p)(it); \
|
!M_C(name, _end_p)(it); \
|
||||||
M_C(name, _next)(it)) { \
|
M_C(name, _next)(it)) { \
|
||||||
const M_C(name, _type_t) *item = M_C(name, _cref)(it); \
|
const M_C(name, _type_t) *item = M_C(name, _cref)(it); \
|
||||||
M_IF(isSet)( \
|
value_type *ptr = M_C(name, _get)(dict2, M_IF(isSet)(*item, item->key)); \
|
||||||
value_type *ptr = M_C(name, _get)(dict2, *item); \
|
|
||||||
if (ptr == NULL) \
|
|
||||||
return false; \
|
|
||||||
, \
|
|
||||||
value_type *ptr = M_C(name, _get)(dict2, item->key); \
|
|
||||||
if (ptr == NULL) \
|
if (ptr == NULL) \
|
||||||
return false; \
|
return false; \
|
||||||
if (M_CALL_EQUAL(value_oplist, item->value, *ptr) == false) \
|
if (M_CALL_EQUAL(value_oplist, item->value, *ptr) == false) \
|
||||||
return false; \
|
return false; \
|
||||||
) \
|
|
||||||
} \
|
} \
|
||||||
return true; \
|
return true; \
|
||||||
} \
|
} \
|
||||||
@@ -630,6 +624,7 @@
|
|||||||
\
|
\
|
||||||
DICTI_FUNC_ADDITIONAL_DEF2(name, key_type, key_oplist, value_type, value_oplist, isSet, dict_t, dict_it_t)
|
DICTI_FUNC_ADDITIONAL_DEF2(name, key_type, key_oplist, value_type, value_oplist, isSet, dict_t, dict_it_t)
|
||||||
|
|
||||||
|
|
||||||
/* Define additional functions for dictionnary (Common for all kinds of dictionnary).
|
/* Define additional functions for dictionnary (Common for all kinds of dictionnary).
|
||||||
Do not used any fields of the dictionnary but the public API */
|
Do not used any fields of the dictionnary but the public API */
|
||||||
#define DICTI_FUNC_ADDITIONAL_DEF2(name, key_type, key_oplist, value_type, value_oplist, isSet, dict_t, dict_it_t) \
|
#define DICTI_FUNC_ADDITIONAL_DEF2(name, key_type, key_oplist, value_type, value_oplist, isSet, dict_t, dict_it_t) \
|
||||||
|
|||||||
Reference in new issue
Block a user