[Bf-blender-cvs] [b986f95] master: Disable assert for polyfill
Campbell Barton
noreply at git.blender.org
Tue Jun 16 13:19:15 CEST 2015
Commit: b986f955e96578e691e3561142b571609957ade0
Author: Campbell Barton
Date: Tue Jun 16 21:13:22 2015 +1000
Branches: master
https://developer.blender.org/rBb986f955e96578e691e3561142b571609957ade0
Disable assert for polyfill
Would fail on some zero-area ngons.
===================================================================
M source/blender/blenlib/intern/polyfill2d.c
===================================================================
diff --git a/source/blender/blenlib/intern/polyfill2d.c b/source/blender/blenlib/intern/polyfill2d.c
index 629bed1..df6caa4 100644
--- a/source/blender/blenlib/intern/polyfill2d.c
+++ b/source/blender/blenlib/intern/polyfill2d.c
@@ -61,6 +61,9 @@
# define USE_KDTREE
#endif
+/* disable in production, it can fail on near zero area ngons */
+// #define USE_STRICT_ASSERT
+
// #define DEBUG_TIME
#ifdef DEBUG_TIME
# include "PIL_time_utildefines.h"
@@ -797,6 +800,7 @@ static void polyfill_prepare(
}
else {
/* chech we're passing in correcty args */
+#ifdef USE_STRICT_ASSERT
#ifndef NDEBUG
if (coords_sign == 1) {
BLI_assert(cross_poly_v2(coords, coords_tot) >= 0.0f);
@@ -805,6 +809,7 @@ static void polyfill_prepare(
BLI_assert(cross_poly_v2(coords, coords_tot) <= 0.0f);
}
#endif
+#endif
}
if (coords_sign == 1) {
More information about the Bf-blender-cvs
mailing list