From d41e3a2bd127dab951e4e2cf68f18713bd276137 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 30 Nov 2009 13:58:41 +0000
Subject: [PATCH] use std::numeric_limit instead INT_MIN INT_MAX

---
 Geo/GModelIO_Mesh.cpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp
index 55e8f6fa7e..cca7ca0499 100644
--- a/Geo/GModelIO_Mesh.cpp
+++ b/Geo/GModelIO_Mesh.cpp
@@ -3,6 +3,7 @@
 // See the LICENSE.txt file for license information. Please report all
 // bugs and problems to <gmsh@geuz.org>.
 
+#include <limits>
 #include <stdlib.h>
 #include <string.h>
 #include <map>
@@ -2942,8 +2943,8 @@ GModel *GModel::createGModel(std::map<int, MVertex*> &vertexMap,
   std::map<int, MVertex*>::const_iterator it = vertexMap.begin();
   std::map<int, MVertex*>::const_iterator end = vertexMap.end();
 	
-  int maxVertex = INT_MIN;
-  int minVertex = INT_MAX;
+  int maxVertex = std::numeric_limits<int>::min();
+  int minVertex = std::numeric_limits<int>::max();
   int num;
 	
   for(it; it != end; ++it){
@@ -2951,7 +2952,7 @@ GModel *GModel::createGModel(std::map<int, MVertex*> &vertexMap,
     minVertex = std::min(minVertex, num);
     maxVertex = std::max(maxVertex, num);
   }
-  if(minVertex == INT_MAX)
+  if(minVertex == std::numeric_limits<int>::max())
     Msg::Error("Could not determine the min index of vertices");
   
   // If the vertex numbering is dense, tranfer the map into a
-- 
GitLab