[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34879] trunk/blender/intern/mikktspace/ mikktspace.c: Fix from sparky for compile problem with older GCC
Nathan Letwory
nathan at letworyinteractive.com
Tue Feb 15 20:57:34 CET 2011
Revision: 34879
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34879
Author: jesterking
Date: 2011-02-15 19:57:33 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Fix from sparky for compile problem with older GCC
Modified Paths:
--------------
trunk/blender/intern/mikktspace/mikktspace.c
Modified: trunk/blender/intern/mikktspace/mikktspace.c
===================================================================
--- trunk/blender/intern/mikktspace/mikktspace.c 2011-02-15 19:22:08 UTC (rev 34878)
+++ trunk/blender/intern/mikktspace/mikktspace.c 2011-02-15 19:57:33 UTC (rev 34879)
@@ -434,7 +434,12 @@
// it is IMPORTANT that this function is called to evaluate the hash since
// inlining could potentially reorder instructions and generate different
// results for the same effective input value fVal.
-static volatile int FindGridCell(const float fMin, const float fMax, const float fVal)
+#if defined(_MSC_VER) && !defined(FREE_WINDOWS)
+ #define NOINLINE __declspec(noinline)
+#else
+ #define NOINLINE __attribute__((noinline))
+#endif
+static NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
{
const float fIndex = (g_iCells-1) * ((fVal-fMin)/(fMax-fMin));
const int iIndex = fIndex<0?0:((int) (fIndex+0.5f));
More information about the Bf-blender-cvs
mailing list