From 52794087113ff895d998566d7d850f8565b51749 Mon Sep 17 00:00:00 2001 From: Li-Ta Lo Date: Wed, 3 May 2023 12:35:53 -0600 Subject: [PATCH] revert renaming this to self --- .../raytracing/VolumeRendererStructured.cxx | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/vtkm/rendering/raytracing/VolumeRendererStructured.cxx b/vtkm/rendering/raytracing/VolumeRendererStructured.cxx index 6cc0fc3ce..86d084d2c 100644 --- a/vtkm/rendering/raytracing/VolumeRendererStructured.cxx +++ b/vtkm/rendering/raytracing/VolumeRendererStructured.cxx @@ -44,11 +44,12 @@ template class LocatorAdapterBase { private: - const Derived* self = static_cast(this); - public: VTKM_EXEC - inline bool IsInside(const vtkm::Vec3f_32& point) const { return self->Locator.IsInside(point); } + inline bool IsInside(const vtkm::Vec3f_32& point) const + { + return static_cast(this)->Locator.IsInside(point); + } // Assumes point inside the data set VTKM_EXEC @@ -58,6 +59,7 @@ public: vtkm::Vec3f& parametric) const { vtkm::Id cellId{}; + auto self = static_cast(this); self->Locator.FindCell(point, cellId, parametric); cell = self->Conn.FlatToLogicalToIndex(cellId); self->ComputeInvSpacing(cell, point, invSpacing, parametric); @@ -66,27 +68,28 @@ public: VTKM_EXEC inline void GetCellIndices(const vtkm::Id3& cell, vtkm::Vec& cellIndices) const { - cellIndices = self->Conn.GetIndices(cell); + cellIndices = static_cast(this)->Conn.GetIndices(cell); } VTKM_EXEC inline vtkm::Id GetCellIndex(const vtkm::Id3& cell) const { - return self->Conn.LogicalToFlatToIndex(cell); + return static_cast(this)->Conn.LogicalToFlatToIndex(cell); } VTKM_EXEC inline void GetPoint(const vtkm::Id& index, vtkm::Vec3f_32& point) const { - BOUNDS_CHECK(self->Coordinates, index); - point = self->Coordinates.Get(index); + BOUNDS_CHECK(static_cast(this)->Coordinates, index); + point = static_cast(this)->Coordinates.Get(index); } VTKM_EXEC inline void GetMinPoint(const vtkm::Id3& cell, vtkm::Vec3f_32& point) const { - const vtkm::Id pointIndex = self->Conn.LogicalToFlatFromIndex(cell); - point = self->Coordinates.Get(pointIndex); + const vtkm::Id pointIndex = + static_cast(this)->Conn.LogicalToFlatFromIndex(cell); + point = static_cast(this)->Coordinates.Get(pointIndex); } };