Change CellShapeTag*:Id type to vtkm::UInt8

The shape array in CellSetExplicit was changed a while ago to be of type
vtkm::UInt8. However, the shape types remained at vtkm::IdComponent. I
can think of no reason why they should not be the same type.
This commit is contained in:
Kenneth Moreland 2016-11-04 20:59:19 -06:00
parent b175468082
commit 3f9a1edb7b
2 changed files with 4 additions and 5 deletions

@ -92,7 +92,7 @@ struct CellShapeIdToTag {
#define VTKM_DEFINE_CELL_TAG(name, idname) \
struct CellShapeTag ## name { \
static const vtkm::IdComponent Id = vtkm::idname; \
static const vtkm::UInt8 Id = vtkm::idname; \
}; \
namespace internal { \
template<> \
@ -135,9 +135,9 @@ VTKM_DEFINE_CELL_TAG(Pyramid, CELL_SHAPE_PYRAMID);
///
struct CellShapeTagGeneric {
VTKM_EXEC_CONT
CellShapeTagGeneric(vtkm::IdComponent shape) : Id(shape) { }
CellShapeTagGeneric(vtkm::UInt8 shape) : Id(shape) { }
vtkm::IdComponent Id;
vtkm::UInt8 Id;
};

@ -68,8 +68,7 @@ public:
VTKM_EXEC
CellShapeTag GetCellShape(vtkm::Id index) const
{
// Likewise, should Shapes be vtkm::Id or something smaller?
return CellShapeTag(static_cast<vtkm::IdComponent>(this->Shapes.Get(index)));
return CellShapeTag(this->Shapes.Get(index));
}
using IndicesType = vtkm::VecFromPortal<ConnectivityPortalType>;