diff options
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operator_api_inline.h | 7 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_operators.c | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.h b/source/blender/bmesh/intern/bmesh_operator_api_inline.h index 77310d958e6..2b78b775723 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api_inline.h +++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h @@ -78,11 +78,10 @@ BLI_INLINE void BMO_slot_map_int_insert(BMOperator *op, BMOpSlot *slot, } BLI_INLINE void BMO_slot_map_bool_insert(BMOperator *op, BMOpSlot *slot, - void *element, const int val) + void *element, const bool val) { - union { void *ptr; int val; } t = {NULL}; + union { void *ptr; bool val; } t = {NULL}; BLI_assert(slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_BOOL); - BLI_assert(val == false || val == true); BMO_slot_map_insert(op, slot, element, ((t.val = val), t.ptr)); } @@ -170,7 +169,7 @@ BLI_INLINE bool BMO_slot_map_bool_get(BMOpSlot *slot, const void *element) data = BMO_slot_map_data_get(slot, element); if (data) { - return **(int **)data; + return **(bool **)data; } else { return false; diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index b4439703c4a..3dca80ca38a 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -1466,7 +1466,7 @@ int BMO_iter_map_value_int(BMOIter *iter) bool BMO_iter_map_value_bool(BMOIter *iter) { BLI_assert(iter->slot->slot_subtype.map == BMO_OP_SLOT_SUBTYPE_MAP_BOOL); - return **((int **)iter->val); + return **((bool **)iter->val); } /* error system */ |