From 58ee19fd5250dce27c300f94f31f380152a239b6 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 20 May 2009 07:57:48 +0000
Subject: [PATCH] fix pb with max template

---
 Geo/OCC_Connect.cpp | 16 +++++-----------
 Makefile            |  2 +-
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/Geo/OCC_Connect.cpp b/Geo/OCC_Connect.cpp
index 6a3612b97d..2f27c9409c 100644
--- a/Geo/OCC_Connect.cpp
+++ b/Geo/OCC_Connect.cpp
@@ -56,12 +56,6 @@
 #include <BRepBuilderAPI_Transform.hxx>
 
 
-template <typename T>
-T max(T const &a, T const &b)
-{
-    return a<b? b:a;
-}
-
 ////////////////////////////////////////////////////////////////////////////////
 // Printing routines
 ////////////////////////////////////////////////////////////////////////////////
@@ -150,7 +144,7 @@ int OCC_Connect::SaveBRep(char const *name)
 	p.RemoveFirst()
     )
 	BB.Add(compound,p.First());
-    BRepTools::Write(compound,name);
+    BRepTools::Write(compound, (char*)name);
 }
 
 void OCC_Connect::Dump(ostream &out) const
@@ -600,8 +594,8 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target,
             BRepExtrema_ExtPC distance(vertex,edge);
             if(!distance.IsDone())
                 continue;
-            double tolerance=max(BRep_Tool::Tolerance(edge),
-                BRep_Tool::Tolerance(vertex));
+            double tolerance=std::max(BRep_Tool::Tolerance(edge),
+				      BRep_Tool::Tolerance(vertex));
             for(int i=1;i<=distance.NbExt();i++) {
                 if(distance.Value(i)<tolerance) {
                     try {
@@ -652,8 +646,8 @@ void OCC_Connect::Intersect(BRep_Builder &BB, TopoDS_Shape &target,
             BRepExtrema_ExtPC distance(vertex,edge);
             if(!distance.IsDone())
                 continue;
-            double tolerance=max(BRep_Tool::Tolerance(edge),
-                BRep_Tool::Tolerance(vertex));
+            double tolerance=std::max(BRep_Tool::Tolerance(edge),
+				      BRep_Tool::Tolerance(vertex));
             for(int i=1;i<=distance.NbExt();i++) {
                 if(distance.Value(i)<tolerance) {
                     try {
diff --git a/Makefile b/Makefile
index 1be159addb..89dd31652d 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ include variables
 GMSH_MAJOR_VERSION = 2
 GMSH_MINOR_VERSION = 3
 GMSH_PATCH_VERSION = 1
-GMSH_EXTRA_VERSION =
+GMSH_EXTRA_VERSION = "-cvs-20090520"
 
 GMSH_VERSION =\
   ${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}.${GMSH_PATCH_VERSION}${GMSH_EXTRA_VERSION}
-- 
GitLab