Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Letwory <nathan@letworyinteractive.com>2011-02-15 22:57:33 +0300
committerNathan Letwory <nathan@letworyinteractive.com>2011-02-15 22:57:33 +0300
commitb94be2aa14049dfd8c502edbd5d2fbf165dc5396 (patch)
tree3cccea749aefaab17b301da4602b8119c7e504f0 /intern/mikktspace
parent610917d52e25a11636d308c1337883971b5e51f9 (diff)
Fix from sparky for compile problem with older GCC
Diffstat (limited to 'intern/mikktspace')
-rw-r--r--intern/mikktspace/mikktspace.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index fae8c4edc8d..125725a44ff 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -434,7 +434,12 @@ static const int g_iCells = 2048;
// 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));