]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Eliminating the Wsign-compare warning in medcouplingremapper
authorEugeny MALTCHIKOV <emv@salomex.nnov.opencascade.com>
Thu, 17 Oct 2019 13:52:17 +0000 (16:52 +0300)
committerEugeny MALTCHIKOV <emv@salomex.nnov.opencascade.com>
Thu, 17 Oct 2019 13:52:17 +0000 (16:52 +0300)
src/MEDCoupling/MEDCouplingRemapper.cxx [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 5521faf..7cf6cf7
@@ -104,7 +104,7 @@ void MEDCouplingRemapper::setCrudeMatrix(const MEDCouplingMesh *srcMesh, const M
 void MEDCouplingRemapper::setCrudeMatrixEx(const MEDCouplingFieldTemplate *src, const MEDCouplingFieldTemplate *target, const std::vector<std::map<int,double> >& m)
 {
   restartUsing(src,target);
-  if(m.size()!=target->getNumberOfTuplesExpected())
+  if(ToIdType(m.size())!=target->getNumberOfTuplesExpected())
     {
       std::ostringstream oss; oss << "MEDCouplingRemapper::setMatrixEx : input matrix has " << m.size() << " rows whereas there are " << target->getNumberOfTuplesExpected() << " expected !";
       throw INTERP_KERNEL::Exception(oss.str());
@@ -904,7 +904,7 @@ int MEDCouplingRemapper::prepareNotInterpKernelOnlyGaussGauss()
         }
       _matrix[*trgId][srcEntry]=1.;
     }
-  if(ids0->getNumberOfTuples()!=trgNbOfGaussPts)
+  if(ToIdType(ids0->getNumberOfTuples())!=trgNbOfGaussPts)
     {
       MCAuto<DataArrayInt> orphanTrgIds=nbOfSrcCellsShTrgPts->findIdsEqual(0);
       MCAuto<DataArrayDouble> orphanTrg=trgLoc->selectByTupleId(orphanTrgIds->begin(),orphanTrgIds->end());
@@ -1078,7 +1078,7 @@ void MEDCouplingRemapper::transferUnderground(const MEDCouplingFieldDouble *srcF
   if(array)
     {
       targetField->checkConsistencyLight();
-      if(srcNbOfCompo!=targetField->getNumberOfComponents())
+      if(srcNbOfCompo!=ToIdType(targetField->getNumberOfComponents()))
         throw INTERP_KERNEL::Exception("Number of components mismatch !");
     }
   else