Salome HOME
Fix compilation error and some warnings
[modules/geom.git] / src / GEOM_I / GEOM_IMeasureOperations_i.cc
index 591861013c0f94ea435dad4ee7bf6faf0d6f7fff..ad7fe1b03b5c1a56e78c2f648f16f9569b1c1e97 100644 (file)
@@ -936,7 +936,7 @@ GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_
   //Set a not done flag
   GetOperations()->SetNotDone();
   
-  unsigned int nb_points = theCoords.length()/3;
+  int nb_points = theCoords.length()/3;
 
   GEOM::ListOfBool_var aResults = new GEOM::ListOfBool;
   aResults->length(nb_points);
@@ -947,8 +947,8 @@ GEOM::ListOfBool* GEOM_IMeasureOperations_i::AreCoordsInside (GEOM::GEOM_Object_
   for (int i = 0; i < 3*nb_points; i++)
     tmp[i] = theCoords[i];
   std::vector<bool> res = GetOperations()->AreCoordsInside(aShape, tmp, tolerance);
-  for (int i = 0; i < nb_points; i++)
-    aResults[i] = i < res.size() ? res[i] : false;
+  for (int i = 0, resSize = res.size();  i < nb_points; i++)
+    aResults[i] = i < resSize ? res[i] : false;
   return aResults._retn();
 }