From b0768a15d65de54b9fffc6e265f217f36800d947 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 13 Jul 2010 08:42:08 +0000
Subject: [PATCH] fix msvc compile

---
 Geo/MElementCut.h        | 1 +
 Plugin/Distance.cpp      | 2 +-
 Solver/groupOfElements.h | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Geo/MElementCut.h b/Geo/MElementCut.h
index a192631574..124daf26ad 100644
--- a/Geo/MElementCut.h
+++ b/Geo/MElementCut.h
@@ -238,6 +238,7 @@ class MPolygon : public MElement {
   virtual const polynomialBasis* getFunctionSpace(int order=-1) const
   {
     if (_orig) return _orig->getFunctionSpace(order);
+	return 0;
   }
   virtual void getShapeFunctions(double u, double v, double w, double s[], int o)
   {
diff --git a/Plugin/Distance.cpp b/Plugin/Distance.cpp
index 32c14b2147..9bc823c578 100644
--- a/Plugin/Distance.cpp
+++ b/Plugin/Distance.cpp
@@ -395,7 +395,7 @@ PView *GMSH_DistancePlugin::execute(PView *v)
       }
     }
   }  
-  int mid = (int)floor(allElems.size()/2);
+  int mid = (int)floor(allElems.size() / 2.);
   MElement *e = allElems[mid];
   MVertex *vFIX = e->getVertex(0);
   myAssembler.fixVertex(vFIX, 0, 1, 0.0);
diff --git a/Solver/groupOfElements.h b/Solver/groupOfElements.h
index 620d8ccb77..05b33c0d35 100644
--- a/Solver/groupOfElements.h
+++ b/Solver/groupOfElements.h
@@ -102,7 +102,7 @@ class groupOfLagMultElements : public groupOfElements
 
   void fillElementContainer(groupOfElements &pElem, groupOfElements &sElem)
   {
-    groupOfElements::elementContainer::iterator itp = pElem.begin();
+    groupOfElements::elementContainer::const_iterator itp = pElem.begin();
     for (;itp!=pElem.end(); itp++)
     {
       if ((*itp)->getParent())
-- 
GitLab