Revision: 54127
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54127&view=rev
Author:   r_weiss
Date:     2013-01-02 21:52:25 +0000 (Wed, 02 Jan 2013)
Log Message:
-----------
Update to file "brep.cpp" to prevent a name conflict with the Windows macros 
"max" and "min". 

Modified Paths:
--------------
    brlcad/trunk/src/librt/primitives/brep/brep.cpp

Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp
===================================================================
--- brlcad/trunk/src/librt/primitives/brep/brep.cpp     2013-01-02 21:49:42 UTC 
(rev 54126)
+++ brlcad/trunk/src/librt/primitives/brep/brep.cpp     2013-01-02 21:52:25 UTC 
(rev 54127)
@@ -49,7 +49,17 @@
 
 #include "brep_debug.h"
 
+/* undefine "min" and "max" macros, if they exist, to prevent
+ * name conflicts with functions "std::min" and "std::max".
+ */ 
+#ifdef max
+#undef max
+#endif
 
+#ifdef min
+#undef min
+#endif
+
 #define BN_VMATH_PREFIX_INDICES 1
 #define ROOT_TOL 1.E-7
 
@@ -900,7 +910,10 @@
        double x = (B2*C1 - B1*C2)/det;
        double y = (A1*C2 - A2*C1)/det;
 
-       if ((x >= std::min(x1, x2)) && (x <= std::max(x1, x2)) && (x >= 
std::min(x3, x4)) && (x <= std::max(x3, x4)) && (y >= std::min(y1, y2)) && (y 
<= std::max(y1, y2)) && (y >= std::min(y3, y4)) && (y <= std::max(y3, y4))) {
+       if ((x >= std::min<double>(x1, x2)) && (x <= std::max<double>(x1, x2)) 
&& 
+           (x >= std::min<double>(x3, x4)) && (x <= std::max<double>(x3, x4)) 
&& 
+           (y >= std::min<double>(y1, y2)) && (y <= std::max<double>(y1, y2)) 
&& 
+           (y >= std::min<double>(y3, y4)) && (y <= std::max<double>(y3, y4))) 
{
            return true;
        }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to