std::map<int,int> ComputeMapOfType()
{
std::map<int,int> ret;
- int nbOfTypesInMC(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(int));
+ int nbOfTypesInMC(sizeof(MEDCOUPLING2VTKTYPETRADUCER)/sizeof( decltype(MEDCOUPLING2VTKTYPETRADUCER[0]) ));
for(int i=0;i<nbOfTypesInMC;i++)
{
- int vtkId(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[i]);
- if(vtkId!=-1)
+ auto vtkId(MEDCOUPLING2VTKTYPETRADUCER[i]);
+ if(vtkId!=MEDCOUPLING2VTKTYPETRADUCER_NONE)
ret[vtkId]=i;
}
return ret;
std::map<int,int> ComputeMapOfType()
{
std::map<int,int> ret;
- int nbOfTypesInMC(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(int));
+ int nbOfTypesInMC(sizeof(MEDCOUPLING2VTKTYPETRADUCER)/sizeof( decltype(MEDCOUPLING2VTKTYPETRADUCER[0]) ));
for(int i=0;i<nbOfTypesInMC;i++)
{
- int vtkId(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[i]);
- if(vtkId!=-1)
+ auto vtkId(MEDCOUPLING2VTKTYPETRADUCER[i]);
+ if(vtkId!=MEDCOUPLING2VTKTYPETRADUCER_NONE)
ret[vtkId]=i;
}
return ret;
std::map<int,int> ComputeRevMapOfType()
{
std::map<int,int> ret;
- int nbOfTypesInMC(sizeof(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER)/sizeof(int));
+ int nbOfTypesInMC(sizeof(MEDCOUPLING2VTKTYPETRADUCER)/sizeof( decltype(MEDCOUPLING2VTKTYPETRADUCER[0]) ));
for(int i=0;i<nbOfTypesInMC;i++)
{
- int vtkId(MEDCouplingUMesh::MEDCOUPLING2VTKTYPETRADUCER[i]);
- if(vtkId!=-1)
+ auto vtkId(MEDCOUPLING2VTKTYPETRADUCER[i]);
+ if(vtkId!=MEDCOUPLING2VTKTYPETRADUCER_NONE)
ret[i]=vtkId;
}
return ret;