[Bf-blender-cvs] [8e5c407fc44] master: Fix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined functions

Joshua Leung noreply at git.blender.org
Tue Mar 20 04:03:54 CET 2018


Commit: 8e5c407fc446b35042c626e7d60ff9a2336093f4
Author: Joshua Leung
Date:   Tue Mar 20 16:03:43 2018 +1300
Branches: master
https://developer.blender.org/rB8e5c407fc446b35042c626e7d60ff9a2336093f4

Fix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined functions

ERROR: blenlib/intern/math_base_inline.c:371 - '__func__' : undeclared identifier (C:\blenderdev\master2\blender\source\blender\editors\lattice\editlattice_tools.c)  [C2065]

===================================================================

M	source/blender/blenlib/intern/math_base_inline.c

===================================================================

diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index eed06c7841b..1f517471407 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -368,8 +368,10 @@ MINLINE int compare_ff_relative(float a, float b, const float max_diff, const in
 {
 	union {float f; int i;} ua, ub;
 
+#if 0  /* No BLI_assert in INLINE :/ */
 	BLI_assert(sizeof(float) == sizeof(int));
 	BLI_assert(max_ulps < (1 << 22));
+#endif
 
 	if (fabsf(a - b) <= max_diff) {
 		return 1;



More information about the Bf-blender-cvs mailing list