{
if(step>0)
{
- if(begin<=value && end<value)
+ if(begin<=value && value<end)
{
if((value-begin)%step==0)
return (value-begin)/step;
}
else
{
- if(begin>=value && end>value)
+ if(begin>=value && value>end)
{
if((begin-value)%(-step)==0)
return (begin-value)/(-step);
DataArrayInt *arrOut=0,*arrIOut=0;
MEDCouplingUMesh::SetPartOfIndexedArrays(cellIdsBg,cellIdsEnd,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index,
arrOut,arrIOut);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arrOutAuto(arrOut),arrIOutAuto(arrIOut);
setConnectivity(arrOut,arrIOut,true);
}
}
{
DataArrayInt *arrOut=0,*arrIOut=0;
MEDCouplingUMesh::SetPartOfIndexedArrays2(start,end,step,_nodal_connec,_nodal_connec_index,otherOnSameCoordsThanThis._nodal_connec,otherOnSameCoordsThanThis._nodal_connec_index,
- arrOut,arrIOut);
+ arrOut,arrIOut);
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arrOutAuto(arrOut),arrIOutAuto(arrIOut);
setConnectivity(arrOut,arrIOut,true);
}
}
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
}
+ srcArrIndexPtr=srcArrIndex->getConstPointer();
arrIo->alloc(nbOfTuples+1,1);
arro->alloc(arrIn->getNumberOfTuples()+offset,1);
const int *arrInPtr=arrIn->getConstPointer();
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
}
+ srcArrIndexPtr=srcArrIndex->getConstPointer();
arrIo->alloc(nbOfTuples+1,1);
arro->alloc(arrIn->getNumberOfTuples()+offset,1);
const int *arrInPtr=arrIn->getConstPointer();