[Bf-blender-cvs] [9531091] master: Fix compilation error with debug SCons
Sergey Sharybin
noreply at git.blender.org
Tue May 13 19:52:59 CEST 2014
Commit: 9531091eb8ec4c8c7e62d727f962e19c334e7ef2
Author: Sergey Sharybin
Date: Tue May 13 19:50:55 2014 +0200
https://developer.blender.org/rB9531091eb8ec4c8c7e62d727f962e19c334e7ef2
Fix compilation error with debug SCons
For some reason SCons defines _DEBUG, not DEBUG as mathutils was
expecting it to be.
Made it so mathutils checks for NDEBUG which mimics BLI_assert
define.
===================================================================
M source/blender/blenlib/BLI_math_base.h
===================================================================
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 5bd8490..54e9349 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -255,7 +255,7 @@ double double_round(double x, int ndigits);
/* asserts, some math functions expect normalized inputs
* check the vector is unit length, or zero length (which can't be helped in some cases).
*/
-#ifdef DEBUG
+#ifndef NDEBUG
/* note: 0.0001 is too small becaues normals may be converted from short's: see [#34322] */
# define BLI_ASSERT_UNIT_EPSILON 0.0002f
# define BLI_ASSERT_UNIT_V3(v) { \
More information about the Bf-blender-cvs
mailing list