From 06f5119c29467c2824f43a8bf2b1190d69af6605 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Mon, 18 May 2020 18:41:47 -0600 Subject: [PATCH] Fix deprecation warning This came up when updating VTK-m in VTK. --- vtkm/cont/CellSetExplicit.hxx | 2 +- vtkm/cont/CellSetPermutation.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/vtkm/cont/CellSetExplicit.hxx b/vtkm/cont/CellSetExplicit.hxx index 815df2f8d..4007b85cc 100644 --- a/vtkm/cont/CellSetExplicit.hxx +++ b/vtkm/cont/CellSetExplicit.hxx @@ -184,7 +184,7 @@ CellSetExplicit::ShapesReadPortal() const template 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 ::GetCellShape(vtkm::Id cellid) const { diff --git a/vtkm/cont/CellSetPermutation.h b/vtkm/cont/CellSetPermutation.h index b8bbfccc7..a84f66e73 100644 --- a/vtkm/cont/CellSetPermutation.h +++ b/vtkm/cont/CellSetPermutation.h @@ -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