diff options
Diffstat (limited to 'source/blender/bmesh/bmesh_class.h')
-rw-r--r-- | source/blender/bmesh/bmesh_class.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h index 824884fb4e4..4fa3a69356f 100644 --- a/source/blender/bmesh/bmesh_class.h +++ b/source/blender/bmesh/bmesh_class.h @@ -253,18 +253,17 @@ enum { }; /* defines */ - #define BM_ELEM_CD_GET_VOID_P(ele, offset) \ - ((void)0, (void *)((char *)(ele)->head.data + (offset))) + (assert(offset != -1), (void *)((char *)(ele)->head.data + (offset))) #define BM_ELEM_CD_SET_FLOAT(ele, offset, f) \ - { *((float *)((char *)(ele)->head.data + (offset))) = (f); } (void)0 + { assert(offset != -1); *((float *)((char *)(ele)->head.data + (offset))) = (f); } (void)0 #define BM_ELEM_CD_GET_FLOAT(ele, offset) \ - ((void)0, *((float *)((char *)(ele)->head.data + (offset)))) + (assert(offset != -1), *((float *)((char *)(ele)->head.data + (offset)))) #define BM_ELEM_CD_GET_FLOAT_AS_UCHAR(ele, offset) \ - (unsigned char)(BM_ELEM_CD_GET_FLOAT(ele, offset) * 255.0f) + (assert(offset != -1), (unsigned char)(BM_ELEM_CD_GET_FLOAT(ele, offset) * 255.0f)) /*forward declarations*/ |