std::size_t nbOfCompoOth=other.getNumberOfComponents();
std::size_t newNbOfCompo=compoIds.size();
for(std::size_t i=0;i<newNbOfCompo;i++)
- if(compoIds[i]>=nbOfCompoOth || compoIds[i]<0)
+ if(compoIds[i]>=nbOfCompoOth)
{
std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompoOth << ")";
throw INTERP_KERNEL::Exception(oss.str().c_str());
std::size_t partOfCompoToSet=compoIds.size();
std::size_t nbOfCompo=getNumberOfComponents();
for(std::size_t i=0;i<partOfCompoToSet;i++)
- if(compoIds[i]>=nbOfCompo || compoIds[i]<0)
+ if(compoIds[i]>=nbOfCompo)
{
std::ostringstream oss; oss << "Specified component id is out of range (" << compoIds[i] << ") compared with nb of actual components (" << nbOfCompo << ")";
throw INTERP_KERNEL::Exception(oss.str().c_str());
std::size_t newNbOfCompo=compoIds.size();
std::size_t oldNbOfCompo=getNumberOfComponents();
for(std::vector<std::size_t>::const_iterator it=compoIds.begin();it!=compoIds.end();it++)
- if((*it)<0 || (*it)>=oldNbOfCompo)
+ if((*it)>=oldNbOfCompo) // (*it) >= 0 (it is a size_t)
{
std::ostringstream oss; oss << Traits<T>::ArrayTypeName << "::keepSelectedComponents : invalid requested component : " << *it << " whereas it should be in [0," << oldNbOfCompo << ") !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
const T *ptr=this->getConstPointer();
mcIdType nbTuple(this->getNumberOfTuples());
std::size_t nbComps(this->getNumberOfComponents());
- if(compId<0 || compId>=nbComps)
+ if(compId>=nbComps) // compId >= 0 (it is a size_t)
throw INTERP_KERNEL::Exception("DataArrayInt::accumulate : Invalid compId specified : No such nb of components !");
T ret=0;
for(mcIdType i=0;i<nbTuple;i++)
std::size_t j=bg;
for(int i=0;i<nbOfEntriesToKeep;i++,j+=step)
{
- if(j>=0 && j<sz)
+ if(j<sz)
{
const MEDFileAnyTypeField1TSWithoutSDA *tse=_time_steps[j];
MCAuto<MEDFileAnyTypeField1TSWithoutSDA> tse2;