Lines 1-10
Link Here
|
1 |
--- include/Inventor/SbBasic.h.orig 2010-03-02 21:20:09.000000000 +0800 |
1 |
--- include/Inventor/SbBasic.h.orig 2010-03-02 13:20:09 UTC |
2 |
+++ include/Inventor/SbBasic.h 2013-12-01 05:17:51.275860731 +0800 |
2 |
+++ include/Inventor/SbBasic.h |
3 |
@@ -25,6 +25,7 @@ |
3 |
@@ -88,17 +88,24 @@ inline Type SbSqr(const Type val) { |
4 |
\**************************************************************************/ |
4 |
// warning if so for debug builds. inlined like this to not take much |
|
|
5 |
// screenspace in inline functions. |
5 |
|
6 |
|
6 |
#include <Inventor/C/basic.h> |
7 |
-// cc_debugerror_post() is not attempted resolved before the template is |
|
|
8 |
-// used, hence the missing Inventor/errors/SoDebugError.h #include. This |
9 |
-// "trick" does only work *portably* for functions in the global namespace. |
10 |
+// Missing include for cc_debugerror_post() added here. The previous "trick" |
11 |
+// for not needing to resolve symbols in global namespace no longer works |
12 |
+// with newer compilers. |
13 |
+#ifndef NDEBUG |
7 |
+#include <Inventor/C/errors/debugerror.h> |
14 |
+#include <Inventor/C/errors/debugerror.h> |
|
|
15 |
+#endif // !NDEBUG |
8 |
|
16 |
|
|
|
17 |
+ |
18 |
+#ifndef NDEBUG |
19 |
template <typename Type> |
20 |
inline void SbDividerChk(const char * funcname, Type divider) { |
21 |
-#ifndef NDEBUG |
22 |
if (!(divider != static_cast<Type>(0))) |
23 |
cc_debugerror_post(funcname, "divide by zero error.", divider); |
24 |
-#endif // !NDEBUG |
25 |
} |
26 |
+#else |
27 |
+template <typename Type> |
28 |
+inline void SbDividerChk(const char *, Type) {} |
29 |
+#endif // !NDEBUG |
30 |
|
9 |
/* ********************************************************************** */ |
31 |
/* ********************************************************************** */ |
10 |
/* Trap people trying to use Inventor headers while compiling C source code. |
32 |
|