[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42406] trunk/blender/intern/cycles/util: Fix compile issue on windows, broke this trying to fix for mac.
Brecht Van Lommel
brechtvanlommel at pandora.be
Sun Dec 4 16:49:15 CET 2011
Revision: 42406
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42406
Author: blendix
Date: 2011-12-04 15:49:14 +0000 (Sun, 04 Dec 2011)
Log Message:
-----------
Fix compile issue on windows, broke this trying to fix for mac.
Modified Paths:
--------------
trunk/blender/intern/cycles/util/util_boundbox.h
trunk/blender/intern/cycles/util/util_math.h
Modified: trunk/blender/intern/cycles/util/util_boundbox.h
===================================================================
--- trunk/blender/intern/cycles/util/util_boundbox.h 2011-12-04 15:45:53 UTC (rev 42405)
+++ trunk/blender/intern/cycles/util/util_boundbox.h 2011-12-04 15:49:14 UTC (rev 42406)
@@ -19,12 +19,15 @@
#ifndef __UTIL_BOUNDBOX_H__
#define __UTIL_BOUNDBOX_H__
+#include <math.h>
#include <float.h>
-#include <cmath>
+#include "util_math.h"
#include "util_transform.h"
#include "util_types.h"
+using namespace std;
+
CCL_NAMESPACE_BEGIN
class BoundBox
@@ -73,8 +76,8 @@
bool valid(void) const
{
return (min.x <= max.x) && (min.y <= max.y) && (min.z <= max.z) &&
- !(std::isnan(min.x) || std::isnan(min.y) || std::isnan(min.z)) &&
- !(std::isnan(max.x) || std::isnan(max.y) || std::isnan(max.z));
+ !(isnan(min.x) || isnan(min.y) || isnan(min.z)) &&
+ !(isnan(max.x) || isnan(max.y) || isnan(max.z));
}
BoundBox transformed(const Transform *tfm)
Modified: trunk/blender/intern/cycles/util/util_math.h
===================================================================
--- trunk/blender/intern/cycles/util/util_math.h 2011-12-04 15:45:53 UTC (rev 42405)
+++ trunk/blender/intern/cycles/util/util_math.h 2011-12-04 15:49:14 UTC (rev 42406)
@@ -63,6 +63,7 @@
#if(!defined(FREE_WINDOWS))
#define copysignf(x, y) ((float)_copysign(x, y))
#define hypotf(x, y) _hypotf(x, y)
+#define isnan(x) _isnan(x)
#endif
#endif
More information about the Bf-blender-cvs
mailing list