Salome HOME
Ajouts des tests
[tools/medcoupling.git] / src / MEDCoupling_Swig / MEDCouplingCommon.i
index eb3d38b303cf70c33cb2f18abceea3df2b058ae1..e8d5a9db85e5f77ca8b9e03a04022d5f2f4c9c9d 100644 (file)
@@ -1628,7 +1628,7 @@ namespace MEDCoupling
 
            virtual PyObject *findCommonCells(int compType, int startCellId=0) const throw(INTERP_KERNEL::Exception)
            {
-             DataArrayInt *v0=0,*v1=0;
+             DataArrayInt *v0(nullptr),*v1(nullptr);
              self->findCommonCells(compType,startCellId,v0,v1);
              PyObject *res = PyList_New(2);
              PyList_SetItem(res,0,SWIG_NewPointerObj(SWIG_as_voidptr(v0),SWIGTYPE_p_MEDCoupling__DataArrayInt, SWIG_POINTER_OWN | 0 ));
@@ -1639,8 +1639,17 @@ namespace MEDCoupling
       
            virtual void renumberNodesInConn(PyObject *li) throw(INTERP_KERNEL::Exception)
            {
-             void *da=0;
-             int res1=SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 | 0 );
+             void *da(nullptr);
+             {
+               int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__MapII, 0 |  0 ));
+               if(SWIG_IsOK(res1))
+                 {
+                   MapII *da2(reinterpret_cast<MapII *>(da));
+                   self->renumberNodesInConn(da2->data());
+                   return ;
+                 }
+             }
+             int res1(SWIG_ConvertPtr(li,&da,SWIGTYPE_p_MEDCoupling__DataArrayInt, 0 | 0 ));
              if (!SWIG_IsOK(res1))
                {
                  int size;
@@ -1649,7 +1658,7 @@ namespace MEDCoupling
                }
              else
                {
-                 DataArrayInt *da2=reinterpret_cast< DataArrayInt * >(da);
+                 DataArrayInt *da2(reinterpret_cast< DataArrayInt * >(da));
                  if(!da2)
                    throw INTERP_KERNEL::Exception("Not null DataArrayInt instance expected !");
                  da2->checkAllocated();
@@ -1669,7 +1678,7 @@ namespace MEDCoupling
 
            virtual DataArrayInt *fillCellIdsToKeepFromNodeIds(PyObject *li, bool fullyIn) const
            {
-             DataArrayInt *ret=0;
+             DataArrayInt *ret(nullptr);
              //
              int szArr,sw,iTypppArr;
              std::vector<int> stdvecTyyppArr;