]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Using size_t instead of int (where possible) in INTERP_KERNEL.
authoremv <emv@opencascade.com>
Fri, 18 Oct 2019 11:35:24 +0000 (14:35 +0300)
committeremv <emv@opencascade.com>
Fri, 18 Oct 2019 11:35:24 +0000 (14:35 +0300)
17 files changed:
src/INTERP_KERNEL/Barycentric3DIntersectorP1P1.txx
src/INTERP_KERNEL/CurveIntersector.txx
src/INTERP_KERNEL/Geometric2DIntersector.txx
src/INTERP_KERNEL/Interpolation2D1D.txx
src/INTERP_KERNEL/InterpolationCurve.txx
src/INTERP_KERNEL/InterpolationPlanar.txx
src/INTERP_KERNEL/InterpolationUtils.hxx
src/INTERP_KERNEL/MappedBarycentric3DIntersectorP1P1.txx
src/INTERP_KERNEL/PlanarIntersector.txx
src/INTERP_KERNEL/PointLocator2DIntersector.txx
src/INTERP_KERNEL/PointLocator3DIntersectorP0P1.txx
src/INTERP_KERNEL/PointLocator3DIntersectorP1P1.txx
src/INTERP_KERNEL/TriangulationIntersector.txx
src/MEDCoupling/Test/MEDCouplingBasicsTest0.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx

index 6b0bdf5cf13567ef4527853de4953f9642a1e847..f2af80b6fae865fc6a1d3904f293489f284f0095 100644 (file)
@@ -56,9 +56,9 @@ namespace INTERP_KERNEL
     std::vector<double> CoordsT;
     const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
-    for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+    for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
       {
         typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
         if(!resRow.empty())
index 81d54f386bdc99323638bfeefbac0a52f47a4d5b..1aa6db2049734aaed6a2176a2fd7780175af4f4d 100644 (file)
@@ -159,8 +159,8 @@ namespace INTERP_KERNEL
   void CurveIntersector<MyMeshType,MyMatrix>::adjustBoundingBoxes (std::vector<double>& bbox,
                                                                    double adjustmentEpsAbs)
   {
-    long size = bbox.size()/(2*SPACEDIM);
-    for (int i=0; i<size; i++)
+    std::size_t size = bbox.size()/(2*SPACEDIM);
+    for (std::size_t i=0; i<size; i++)
       {
         for(int idim=0; idim<SPACEDIM; idim++)
           {
index d929824c8e756713ab1c462a42a60975b3c92490..1fbbb27a132bceb740321882e9f9b794034d14d7 100644 (file)
@@ -94,9 +94,9 @@ namespace INTERP_KERNEL
     nodes[1]=new Node(quadrangle[SPACEDIM],quadrangle[SPACEDIM+1]);
     nodes[2]=new Node(quadrangle[2*SPACEDIM],quadrangle[2*SPACEDIM+1]);
     nodes[3]=new Node(quadrangle[3*SPACEDIM],quadrangle[3*SPACEDIM+1]);
-    int nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
+    std::size_t nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
     std::vector<Node *> nodes2(nbOfSourceNodes);
-    for(int i=0;i<nbOfSourceNodes;i++)
+    for(std::size_t i=0;i<nbOfSourceNodes;i++)
       nodes2[i]=new Node(sourceCoords[i*SPACEDIM],sourceCoords[i*SPACEDIM+1]);
     QuadraticPolygon *p1=QuadraticPolygon::BuildLinearPolygon(nodes);
     QuadraticPolygon *p2;
@@ -113,13 +113,13 @@ namespace INTERP_KERNEL
   double GEO2D_INTERSECTOR::intersectGeometryGeneral(const std::vector<double>& targetCoords,
                                                      const std::vector<double>& sourceCoords)
   {
-    int nbOfTargetNodes=targetCoords.size()/SPACEDIM;
+    std::size_t nbOfTargetNodes=targetCoords.size()/SPACEDIM;
     std::vector<Node *> nodes(nbOfTargetNodes);
-    for(int i=0;i<nbOfTargetNodes;i++)
+    for(std::size_t i=0;i<nbOfTargetNodes;i++)
       nodes[i]=new Node(targetCoords[i*SPACEDIM],targetCoords[i*SPACEDIM+1]);
-    int nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
+    std::size_t nbOfSourceNodes=sourceCoords.size()/SPACEDIM;
     std::vector<Node *> nodes2(nbOfSourceNodes);
-    for(int i=0;i<nbOfSourceNodes;i++)
+    for(std::size_t i=0;i<nbOfSourceNodes;i++)
       nodes2[i]=new Node(sourceCoords[i*SPACEDIM],sourceCoords[i*SPACEDIM+1]);
     QuadraticPolygon *p1=QuadraticPolygon::BuildLinearPolygon(nodes);
     QuadraticPolygon *p2=QuadraticPolygon::BuildLinearPolygon(nodes2);
@@ -148,9 +148,9 @@ namespace INTERP_KERNEL
     nodes[0]=new Node(sourceTria[0*SPACEDIM],sourceTria[0*SPACEDIM+1]);
     nodes[1]=new Node(sourceTria[1*SPACEDIM],sourceTria[1*SPACEDIM+1]);
     nodes[2]=new Node(sourceTria[2*SPACEDIM],sourceTria[2*SPACEDIM+1]);
-    int nbOfTargetNodes=targetCell.size()/SPACEDIM;
+    std::size_t nbOfTargetNodes=targetCell.size()/SPACEDIM;
     std::vector<Node *> nodes2(nbOfTargetNodes);
-    for(int i=0;i<nbOfTargetNodes;i++)
+    for(std::size_t i=0;i<nbOfTargetNodes;i++)
       nodes2[i]=new Node(targetCell[i*SPACEDIM],targetCell[i*SPACEDIM+1]);
     QuadraticPolygon *p1=QuadraticPolygon::BuildLinearPolygon(nodes);
     QuadraticPolygon *p2;
@@ -183,9 +183,9 @@ namespace INTERP_KERNEL
   INTERSECTOR_TEMPLATE
   QuadraticPolygon *GEO2D_INTERSECTOR::buildPolygonFrom(const std::vector<double>& coords, NormalizedCellType type)
   {
-    int nbNodes=coords.size()/SPACEDIM;
+    std::size_t nbNodes=coords.size()/SPACEDIM;
     std::vector<Node *> nodes(nbNodes);
-    for(int i=0;i<nbNodes;i++)
+    for(std::size_t i=0;i<nbNodes;i++)
       nodes[i]=new Node(coords[i*SPACEDIM],coords[i*SPACEDIM+1]);
     if(!CellModel::GetCellModel(type).isQuadratic())
       return QuadraticPolygon::BuildLinearPolygon(nodes);
index 1e644d7813c31a94a878a92aa89943d0411f4f47..1fd7db7da84e14997390943d63e3e0b82a1d4875 100644 (file)
@@ -53,7 +53,7 @@ namespace INTERP_KERNEL
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
 
     long global_start =clock();
-    int counter=0;
+    std::size_t counter=0;
     /***********************************************************/
     /* Check both meshes are made of triangles and quadrangles */
     /***********************************************************/
index 097f8d04ed576da18bb81536785e7a160849e97c..e587dfc5c63fd2a9df1a2a0d485e6b9ac8ca87e0 100644 (file)
@@ -83,7 +83,7 @@ namespace INTERP_KERNEL
     static const NumberingPolicy numPol = MyMeshType::My_numPol;
 
     long global_start = clock();
-    int counter=0;   
+    std::size_t counter=0;   
 
     long nbMailleS = myMeshS.getNumberOfElements();
     long nbMailleT = myMeshT.getNumberOfElements();
index eb969ea3b4a54a470325f999e57b9ab461e95b8c..3ac8730fded35ed32c36f100f49ed54189792417 100644 (file)
@@ -121,7 +121,7 @@ namespace INTERP_KERNEL
     static const NumberingPolicy numPol=MyMeshType::My_numPol;
 
     long global_start =clock();
-    int counter=0;   
+    std::size_t counter=0;   
     /***********************************************************/
     /* Check both meshes are made of triangles and quadrangles */
     /***********************************************************/
index f40bd33518b27d324ea181269f2a8213977ee661..aaa4e812c0f9e2c096a9df34c3aeca3daa7c3643 100644 (file)
@@ -197,17 +197,17 @@ namespace INTERP_KERNEL
   inline std::vector<double> bary_poly(const std::vector<double>& V)
   {
     std::vector<double> Bary;
-    long taille=V.size();
+    std::size_t taille=V.size();
     double x=0;
     double y=0;
 
-    for(long i=0;i<taille/2;i++)
+    for(std::size_t i=0;i<taille/2;i++)
       {
         x=x+V[2*i];
         y=y+V[2*i+1];
       }
-    double A=2*x/((double)taille);
-    double B=2*y/((double)taille);
+    double A=2*x/(static_cast<double>(taille));
+    double B=2*y/(static_cast<double>(taille));
     Bary.push_back(A);//taille vecteur=2*nb de points.
     Bary.push_back(B);
 
@@ -801,9 +801,9 @@ namespace INTERP_KERNEL
 
   inline void verif_point_dans_vect(const double* P, std::vector<double>& V, double absolute_precision )
   {
-    long taille=V.size();
+    std::size_t taille=V.size();
     bool isPresent=false;
-    for(long i=0;i<taille/2;i++) 
+    for(std::size_t i=0;i<taille/2;i++) 
       {
         if (sqrt(((P[0]-V[2*i])*(P[0]-V[2*i])+(P[1]-V[2*i+1])*(P[1]-V[2*i+1])))<absolute_precision)
           isPresent=true;
@@ -911,9 +911,9 @@ namespace INTERP_KERNEL
 
   inline void verif_maill_dans_vect(int Num, std::vector<int>& V)
   {
-    long taille=V.size();
+    std::size_t taille=V.size();
     int A=0;
-    for(long i=0;i<taille;i++)
+    for(std::size_t i=0;i<taille;i++)
       {
         if(Num==V[i])
           {
index 1835f3150ec15c1ca1de28b811a7c50f7db789ef..a873d7453dfa02208a5b6bb48d048528d24fa4e8 100644 (file)
@@ -56,9 +56,9 @@ namespace INTERP_KERNEL
     std::vector<double> CoordsT;
     const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
-    for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+    for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
       {
         typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
         if(!resRow.empty())
index 22ac30f9195cff97891a56a4f4bcc8993a066dfa..59871ce69a484b97d90b2d5dc5e4f89b3e0473dd 100644 (file)
@@ -132,8 +132,8 @@ namespace INTERP_KERNEL
   {
     /* We build the segment tree for locating possible matching intersections*/
   
-    long size = bbox.size()/(2*SPACEDIM);
-    for (int i=0; i<size; i++)
+    std::size_t size = bbox.size()/(2*SPACEDIM);
+    for (std::size_t i=0; i<size; i++)
       {
         double max=- std::numeric_limits<double>::max();
         for(int idim=0; idim<SPACEDIM; idim++)
index 54344d8561c7225a9fe6d1a146632f44b7dfab36..2202206ff1be9ebca619cd4cd1786ed5aa928f4c 100644 (file)
@@ -125,9 +125,9 @@ namespace INTERP_KERNEL
   INTERSECTOR_TEMPLATE
   QuadraticPolygon *PTLOC2D_INTERSECTOR::buildPolygonFrom(const std::vector<double>& coords, NormalizedCellType type)
   {
-    int nbNodes=coords.size()/SPACEDIM;
+    std::size_t nbNodes=coords.size()/SPACEDIM;
     std::vector<Node *> nodes(nbNodes);
-    for(int i=0;i<nbNodes;i++)
+    for(std::size_t i=0;i<nbNodes;i++)
       nodes[i]=new Node(coords[i*SPACEDIM],coords[i*SPACEDIM+1]);
     if(!CellModel::GetCellModel(type).isQuadratic())
       return QuadraticPolygon::BuildLinearPolygon(nodes);
index f96e28852e3c30e8b298c79797c44a11d5af3e68..8c2f05419b66bccaddabc8b29acafdb57b759adf 100644 (file)
@@ -54,7 +54,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> coordsTarget;
     Intersector3DP0P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),coordsTarget);
-    int nbNodesT=coordsTarget.size()/SPACEDIM;
+    std::size_t nbNodesT=coordsTarget.size()/SPACEDIM;
     const double *coordsS=Intersector3DP0P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
     const ConnType *startOfCellNodeConnT=Intersector3DP0P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
@@ -63,7 +63,7 @@ namespace INTERP_KERNEL
         const CellModel& cmTypeS=CellModel::GetCellModel(tS);
         std::vector<ConnType> connOfCurCellS;
         Intersector3DP0P1<MyMeshType,MyMatrix>::getConnOfSourceCell(OTT<ConnType,numPol>::indFC(*iterCellS),connOfCurCellS);
-        for(int nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
+        for(std::size_t nodeIdT=0;nodeIdT<nbNodesT;nodeIdT++)
           {
             if(PointLocatorAlgos<MyMeshType>::isElementContainsPointAlg3D(&coordsTarget[nodeIdT*SPACEDIM],&connOfCurCellS[0],connOfCurCellS.size(),coordsS,cmTypeS,_precision))
               {
index c587e01025977e12bfd453f03e6ed32928d90481..b1fa6fbe383cce51dc648e85fd544c6eb40a6547 100644 (file)
@@ -54,7 +54,7 @@ namespace INTERP_KERNEL
   {
     std::vector<double> CoordsT;
     Intersector3DP1P1<MyMeshType,MyMatrix>::getRealTargetCoordinates(OTT<ConnType,numPol>::indFC(targetCell),CoordsT);
-    int nbOfNodesT=CoordsT.size()/SPACEDIM;
+    std::size_t nbOfNodesT=CoordsT.size()/SPACEDIM;
     const double *coordsS=Intersector3DP1P1<MyMeshType,MyMatrix>::_src_mesh.getCoordinatesPtr();
     for(typename std::vector<ConnType>::const_iterator iterCellS=srcCells.begin();iterCellS!=srcCells.end();iterCellS++)
       {
@@ -63,7 +63,7 @@ namespace INTERP_KERNEL
           throw INTERP_KERNEL::Exception("Invalid source cell detected for meshdim==3. Only TETRA4 supported !");
         const CellModel& cmTypeS=CellModel::GetCellModel(tS);
         const ConnType *startOfCellNodeConnT=Intersector3DP1P1<MyMeshType,MyMatrix>::getStartConnOfTargetCell(targetCell);
-        for(int nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
+        for(std::size_t nodeIdT=0;nodeIdT<nbOfNodesT;nodeIdT++)
           {
             typename MyMatrix::value_type& resRow=res[OTT<ConnType,numPol>::ind2C(startOfCellNodeConnT[nodeIdT])];
             std::vector<ConnType> connOfCurCellS;
index 5efe430ff659821f08c588c567affe6606c234a4..93d75d625ad07ddd4adcc1480befe53c8b9c0f8c 100644 (file)
@@ -103,7 +103,7 @@ namespace INTERP_KERNEL
                                                           bool                       isSourceQuad)
   {
     double result = 0.;
-    ConnType nbNodesS=sourceCoords.size()/SPACEDIM;
+    ConnType nbNodesS=static_cast<ConnType>(sourceCoords.size())/SPACEDIM;
     //Compute the intersection area
     double area[SPACEDIM];
     for(ConnType iT = 1; iT<3; iT++)
@@ -144,8 +144,8 @@ namespace INTERP_KERNEL
                                                    const std::vector<double>& sourceCoords)
   {
     double result = 0.;
-    ConnType nbNodesS=sourceCoords.size()/SPACEDIM;
-    ConnType nbNodesT=targetCoords.size()/SPACEDIM;
+    ConnType nbNodesS=static_cast<ConnType>(sourceCoords.size())/SPACEDIM;
+    ConnType nbNodesT=static_cast<ConnType>(targetCoords.size())/SPACEDIM;
     //Compute the intersection area
     double area[SPACEDIM];
     for(ConnType iT = 1; iT<nbNodesT-1; iT++)
@@ -194,7 +194,7 @@ namespace INTERP_KERNEL
     double inter_area[SPACEDIM], total_area = 0.;
     double total_barycenter[SPACEDIM]={0.,0.};
 
-    const ConnType nbNodesT=targetCell.size()/SPACEDIM;
+    const ConnType nbNodesT=(ConnType)targetCell.size()/SPACEDIM;
     for(ConnType iT = 1; iT<nbNodesT-1; iT++)
     {
       std::vector<double> inter;
index 1ee95f1ae4c8e7878c98a167a54b91ff908e6135..91184f47a89f8c8339d3d2617c912ebf74752fdd 100644 (file)
@@ -1629,7 +1629,7 @@ MEDCouplingUMesh* MEDCouplingBasicsTest::build3D2DTetraTargetMesh(const double i
 
 int MEDCouplingBasicsTest::countNonZero(const std::vector< std::map<int,double> >& matrix)
 {
-  int ret=0.;
+  int ret=0;
   for(std::vector< std::map<int,double> >::const_iterator iter=matrix.begin();iter!=matrix.end();iter++)
     for(std::map<int,double>::const_iterator iter2=(*iter).begin();iter2!=(*iter).end();iter2++)
       if (!INTERP_KERNEL::epsilonEqual((*iter2).second, 0.)) ret +=1;
index 65b3a6c5e86bbf241fa9b9c9fdbae1a755c1a48c..bcaf814dc915016474e3b9d9e8e1f47bdaf3624f 100644 (file)
@@ -1219,7 +1219,7 @@ void MEDCouplingBasicsTest1::testFindCommonNodes()
   //
   targetMesh=build3DTargetMesh_1();
   bool areNodesMerged;
-  unsigned int time=targetMesh->getTimeOfThis();
+  std::size_t time=targetMesh->getTimeOfThis();
   o2n=targetMesh->mergeNodes(1e-10,areNodesMerged,newNbOfNodes);
   targetMesh->updateTime();
   CPPUNIT_ASSERT(time==targetMesh->getTimeOfThis());
@@ -1818,7 +1818,7 @@ void MEDCouplingBasicsTest1::testOperationsOnFields3()
 void MEDCouplingBasicsTest1::testOperationsOnFields4()
 {
   MEDCouplingUMesh *m=build2DTargetMesh_1();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   MEDCouplingFieldDouble *f1=MEDCouplingFieldDouble::New(ON_CELLS,CONST_ON_TIME_INTERVAL);
   f1->setMesh(m);
   DataArrayDouble *array=DataArrayDouble::New();
@@ -2234,13 +2234,13 @@ void MEDCouplingBasicsTest1::testGetValueOn1()
 {
   MEDCouplingUMesh *targetMesh=build2DTargetMesh_1();
   MEDCouplingFieldDouble *fieldOnCells=MEDCouplingFieldDouble::New(ON_CELLS);
-  int nbOfCells=targetMesh->getNumberOfCells();
+  std::size_t nbOfCells=targetMesh->getNumberOfCells();
   fieldOnCells->setMesh(targetMesh);
   DataArrayDouble *array=DataArrayDouble::New();
   array->alloc(nbOfCells,2);
   fieldOnCells->setArray(array);
   double *tmp=array->getPointer();
-  for(int i=0;i<nbOfCells;i++)
+  for(std::size_t i=0;i<nbOfCells;i++)
     { tmp[2*i]=7.+(double)i; tmp[2*i+1]=17.+(double)i; }
   array->decrRef();
   //
index 8fdca210a010c2eece4baa608d420dd066b0df65..cd7ca7559e491694df3d76b24d5ae7cea173c513 100644 (file)
@@ -636,8 +636,8 @@ void MEDCouplingBasicsTest2::testRenumberCellsForFields()
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
   f->setMesh(m);
   DataArrayDouble *arr=DataArrayDouble::New();
-  int nbOfCells=m->getNumberOfCells();
-  arr->alloc(nbOfCells,3);
+  
+  arr->alloc(m->getNumberOfCells(),3);
   f->setArray(arr);
   arr->decrRef();
   const double values1[15]={7.,107.,10007.,8.,108.,10008.,9.,109.,10009.,10.,110.,10010.,11.,111.,10011.};
@@ -883,13 +883,13 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith()
   bool isExcep=false;
   try { mesh1->checkGeoEquivalWith(mesh2,0,1e-12,cellCor,nodeCor);//deepEqual fails
   }
-  catch(INTERP_KERNEL::Exception& e) { isExcep=true; }
+  catch(INTERP_KERNEL::Exception&) { isExcep=true; }
   CPPUNIT_ASSERT(isExcep); isExcep=false;
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor==0);
   try { mesh1->checkGeoEquivalWith(mesh2,1,1e-12,cellCor,nodeCor);//fastEqual has detected something
   }
-  catch(INTERP_KERNEL::Exception& e) { isExcep=true; }
+  catch(INTERP_KERNEL::Exception&) { isExcep=true; }
   CPPUNIT_ASSERT(isExcep); isExcep=false;
   CPPUNIT_ASSERT(cellCor==0);
   CPPUNIT_ASSERT(nodeCor==0);
@@ -931,7 +931,7 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith2()
 void MEDCouplingBasicsTest2::testCopyTinyStringsFromOnFields()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,LINEAR_TIME);
   f->setMesh(m);
   CPPUNIT_ASSERT_EQUAL(5,f->getNumberOfMeshPlacesExpected());
@@ -1107,7 +1107,7 @@ void MEDCouplingBasicsTest2::testChangeUnderlyingMesh1()
 void MEDCouplingBasicsTest2::testGetMaxValue1()
 {
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,LINEAR_TIME);
   f->setMesh(m);
   DataArrayDouble *a1=DataArrayDouble::New();
index 550dfd02eb9391da5df346e261462fc743d064f3..743fef5d5cf59bcd481df4a4ceb3a33b36e049ba 100644 (file)
@@ -734,7 +734,7 @@ void MEDCouplingBasicsTest4::testGetValueOn2()
   MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
   f->setMesh(m);
   DataArrayDouble *arr=DataArrayDouble::New();
-  int nbOfCells=m->getNumberOfCells();
+  std::size_t nbOfCells=m->getNumberOfCells();
   arr->alloc(nbOfCells,3);
   f->setArray(arr);
   arr->decrRef();