X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FMEDCoupling_Swig%2FMEDCouplingCommon.i;h=e8d5a9db85e5f77ca8b9e03a04022d5f2f4c9c9d;hb=06a1e47785f4fc717910e0ba2fd562a238e5e932;hp=eb3d38b303cf70c33cb2f18abceea3df2b058ae1;hpb=a6c4fa941f2f989606ab1ccf0d89c5992a0193a9;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index eb3d38b30..e8d5a9db8 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -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(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 stdvecTyyppArr;