Fix deprecation warning

This came up when updating VTK-m in VTK.
This commit is contained in:
Kenneth Moreland 2020-05-18 18:41:47 -06:00
parent f29a4712b0
commit 06f5119c29
2 changed files with 6 additions and 1 deletions

@ -184,7 +184,7 @@ CellSetExplicit<SST, CST, OST>::ShapesReadPortal() const
template <typename SST, typename CST, typename OST>
VTKM_CONT
VTKM_DEPRECATED(1.6, "Calling GetCellShape(cellid) is a performance bug. Call ShapesReadPortal() and loop over the .Get.")
VTKM_DEPRECATED(1.6, "Calling GetCellShape(cellid) is a performance bug. Call ShapesReadPortal() and loop over the Get.")
vtkm::UInt8 CellSetExplicit<SST, CST, OST>
::GetCellShape(vtkm::Id cellid) const
{

@ -354,10 +354,15 @@ public:
this->ValidCellIds.ReadPortal().Get(cellIndex));
}
VTKM_DEPRECATED(1.6,
"Calling GetCellShape(cellid) is a performance bug. Call ShapesReadPortal() "
"and loop over the Get.")
vtkm::UInt8 GetCellShape(vtkm::Id id) const override
{
// Looping over GetCellShape is a performance bug.
VTKM_DEPRECATED_SUPPRESS_BEGIN
return this->FullCellSet.GetCellShape(this->ValidCellIds.ReadPortal().Get(id));
VTKM_DEPRECATED_SUPPRESS_END
}
void GetCellPointIds(vtkm::Id id, vtkm::Id* ptids) const override