From 6ccf1bb4ea2c50ea122f301a92054397904bbcee Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 1 Mar 2010 11:22:06 +0000
Subject: [PATCH] fix msvc compile

---
 Geo/GModelIO_Geo.cpp  | 2 +-
 Geo/GModelIO_Mesh.cpp | 6 +++---
 Geo/MElement.cpp      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Geo/GModelIO_Geo.cpp b/Geo/GModelIO_Geo.cpp
index 3a5812daf6..206bd826d3 100644
--- a/Geo/GModelIO_Geo.cpp
+++ b/Geo/GModelIO_Geo.cpp
@@ -170,7 +170,7 @@ int GModel::importGEOInternals()
         }
         std::list<GEdge*> b[4];
         for(int j = 0; j < 4; j++){
-          for(int k = 0; k < s->compoundBoundary[j].size(); k++){
+          for(unsigned int k = 0; k < s->compoundBoundary[j].size(); k++){
             GEdge *ge = getEdgeByTag(s->compoundBoundary[j][k]);
             if(ge) b[j].push_back(ge);
           }
diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp
index fe360b96af..0374571043 100644
--- a/Geo/GModelIO_Mesh.cpp
+++ b/Geo/GModelIO_Mesh.cpp
@@ -890,7 +890,7 @@ int GModel::writeDistanceMSH(const std::string &name, double version, bool binar
 	  SPoint3 p3 (v3->x(),v3->y(),v3->z());
 	  signedDistancesPointsTriangle(iDistances, iClosePts, pts, p1,p2,p3);
 	}
-	for (int kk = 0; kk< pts.size(); kk++) {
+	for (unsigned int kk = 0; kk< pts.size(); kk++) {
 	  if (std::abs(iDistances[kk]) < distances[kk] ) 
 	    distances[kk] = std::abs(iDistances[kk]);
 	}
@@ -1026,7 +1026,7 @@ int GModel::writeDistanceMSH(const std::string &name, double version, bool binar
 	  dist.push_back(*(it->second));
 	}
 	fprintf(f3,"){");
-	for (int i=0; i<dist.size(); i++){
+	for (unsigned int i = 0; i < dist.size(); i++){
 	  if (i) fprintf(f3,",%g", dist[i]);
 	  else fprintf(f3,"%g", dist[i]);
 	}   
@@ -1056,7 +1056,7 @@ int GModel::writeDistanceMSH(const std::string &name, double version, bool binar
 	  dist.push_back(it->second);
 	}
 	fprintf(f4,"){");
-	for (int i=0; i<dist.size(); i++){
+	for (unsigned int i = 0; i < dist.size(); i++){
 	  if (i) fprintf(f4,",%g", dist[i]);
 	  else fprintf(f4,"%g", dist[i]);
 	}   
diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 39dc4f2fed..47fba51064 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -429,7 +429,7 @@ void MElement::writeMSH(FILE *fp, double version, bool binary, int num,
     int blob[60] = {type, 1, numTags, num ? num : _num, abs(physical), elementary, 
                     1 + numGhosts, _partition};
     if(ghosts)
-      for(unsigned int i = 0; i < numGhosts; i++) blob[8 + i] = -(*ghosts)[i];
+      for(int i = 0; i < numGhosts; i++) blob[8 + i] = -(*ghosts)[i];
     fwrite(blob, sizeof(int), 4 + numTags, fp);
   }
 
-- 
GitLab