diff options
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_private.h')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_private.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/bmesh/intern/bmesh_private.h b/source/blender/bmesh/intern/bmesh_private.h index 0827901f5c2..b3fe3676ab8 100644 --- a/source/blender/bmesh/intern/bmesh_private.h +++ b/source/blender/bmesh/intern/bmesh_private.h @@ -37,21 +37,21 @@ */ /* returns positive nonzero on error */ -int bmesh_elem_check(void *element, const char htype); -#define BM_CHECK_ELEMENT(el) \ +#ifdef NDEBUG + /* no error checking for release, + * it can take most of the CPU time when running some tools */ +# define BM_CHECK_ELEMENT(el) (void)(el) +#else +int bmesh_elem_check(void *element, const char htype); +# define BM_CHECK_ELEMENT(el) \ if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \ printf("check_element failure, with code %i on line %i in file\n" \ " \"%s\"\n\n", \ - bmesh_elem_check(el, ((BMHeader *)el)->htype), \ + bmesh_elem_check(el, ((BMHeader *)el)->htype), \ __LINE__, __FILE__); \ - } - -#define BM_DISK_EDGE_LINK_GET(e, v) ( \ - ((v) == ((BMEdge *)(e))->v1) ? \ - &((e)->v1_disk_link) : \ - &((e)->v2_disk_link) \ - ) + } (void)0 +#endif int bmesh_radial_length(BMLoop *l); int bmesh_disk_count(BMVert *v); |