From e84245afc793c3ed49d5cf9ffbda88f46d893761 Mon Sep 17 00:00:00 2001 From: "FERMI\\jkleingers" Date: Wed, 20 Dec 2023 12:28:58 -0500 Subject: [PATCH 1/2] BUG FIX: All IDataCreationAction subclasses now correctly pass the geometry path member variable when being cloned. Signed-off-by: FERMI\jkleingers --- src/complex/Filter/Actions/CreateGeometry1DAction.hpp | 8 +------- src/complex/Filter/Actions/CreateGeometry2DAction.hpp | 8 +------- src/complex/Filter/Actions/CreateGeometry3DAction.hpp | 8 +------- .../Filter/Actions/CreateRectGridGeometryAction.cpp | 9 +-------- .../Filter/Actions/CreateVertexGeometryAction.hpp | 5 +---- 5 files changed, 5 insertions(+), 33 deletions(-) diff --git a/src/complex/Filter/Actions/CreateGeometry1DAction.hpp b/src/complex/Filter/Actions/CreateGeometry1DAction.hpp index 8dac33e41a..c2e3a44351 100644 --- a/src/complex/Filter/Actions/CreateGeometry1DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry1DAction.hpp @@ -244,13 +244,7 @@ class CreateGeometry1DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry1DAction()); - action->m_NumEdges = m_NumEdges; - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_EdgeDataName = m_EdgeDataName; - action->m_SharedVerticesName = m_SharedVerticesName; - action->m_SharedEdgesName = m_SharedEdgesName; + auto action = std::unique_ptr(new CreateGeometry1DAction(getCreatedPath(), m_NumEdges, m_NumVertices, m_VertexDataName, m_EdgeDataName, m_SharedVerticesName, m_SharedEdgesName)); action->m_InputVertices = m_InputVertices; action->m_InputEdges = m_InputEdges; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateGeometry2DAction.hpp b/src/complex/Filter/Actions/CreateGeometry2DAction.hpp index d8a91751d5..9ca0ac6f78 100644 --- a/src/complex/Filter/Actions/CreateGeometry2DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry2DAction.hpp @@ -244,13 +244,7 @@ class CreateGeometry2DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry2DAction()); - action->m_NumFaces = m_NumFaces; - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_FaceDataName = m_FaceDataName; - action->m_SharedVerticesName = m_SharedVerticesName; - action->m_SharedFacesName = m_SharedFacesName; + auto action = std::unique_ptr(new CreateGeometry2DAction(getCreatedPath(), m_NumFaces, m_NumVertices, m_VertexDataName, m_FaceDataName, m_SharedVerticesName, m_SharedFacesName)); action->m_InputVertices = m_InputVertices; action->m_InputFaces = m_InputFaces; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateGeometry3DAction.hpp b/src/complex/Filter/Actions/CreateGeometry3DAction.hpp index 94a2b1a88a..3a283b5aa4 100644 --- a/src/complex/Filter/Actions/CreateGeometry3DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry3DAction.hpp @@ -243,13 +243,7 @@ class CreateGeometry3DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry3DAction()); - action->m_NumCells = m_NumCells; - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_CellDataName = m_CellDataName; - action->m_SharedVerticesName = m_SharedVerticesName; - action->m_SharedCellsName = m_SharedCellsName; + auto action = std::unique_ptr(new CreateGeometry3DAction(getCreatedPath(), m_NumCells, m_NumVertices, m_VertexDataName, m_CellDataName, m_SharedVerticesName, m_SharedCellsName)); action->m_InputVertices = m_InputVertices; action->m_InputCells = m_InputCells; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp b/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp index 163708d775..d38163d103 100644 --- a/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp +++ b/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp @@ -174,14 +174,7 @@ Result<> CreateRectGridGeometryAction::apply(DataStructure& dataStructure, Mode IDataAction::UniquePointer CreateRectGridGeometryAction::clone() const { - auto action = std::unique_ptr(new CreateRectGridGeometryAction()); - action->m_NumXBoundTuples = m_NumXBoundTuples; - action->m_NumYBoundTuples = m_NumYBoundTuples; - action->m_NumZBoundTuples = m_NumZBoundTuples; - action->m_CellDataName = m_CellDataName; - action->m_XBoundsArrayName = m_XBoundsArrayName; - action->m_YBoundsArrayName = m_YBoundsArrayName; - action->m_ZBoundsArrayName = m_ZBoundsArrayName; + auto action = std::unique_ptr(new CreateRectGridGeometryAction(getCreatedPath(), m_NumXBoundTuples, m_NumYBoundTuples, m_NumZBoundTuples, m_CellDataName, m_XBoundsArrayName, m_YBoundsArrayName, m_ZBoundsArrayName)); action->m_InputXBounds = m_InputXBounds; action->m_InputYBounds = m_InputYBounds; action->m_InputZBounds = m_InputZBounds; diff --git a/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp b/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp index 2182c17934..1e99748986 100644 --- a/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp +++ b/src/complex/Filter/Actions/CreateVertexGeometryAction.hpp @@ -179,10 +179,7 @@ class CreateVertexGeometryAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateVertexGeometryAction()); - action->m_NumVertices = m_NumVertices; - action->m_VertexDataName = m_VertexDataName; - action->m_SharedVertexListName = m_SharedVertexListName; + auto action = std::unique_ptr(new CreateVertexGeometryAction(getCreatedPath(), m_NumVertices, m_VertexDataName, m_SharedVertexListName)); action->m_InputVertices = m_InputVertices; action->m_ArrayHandlingType = m_ArrayHandlingType; return action; From 0dcae586ea432ef25b7d71a21fbbb0ba50fd9d70 Mon Sep 17 00:00:00 2001 From: Joey Kleingers Date: Wed, 20 Dec 2023 12:35:58 -0500 Subject: [PATCH 2/2] Clang format. Signed-off-by: Joey Kleingers --- src/complex/Filter/Actions/CreateGeometry1DAction.hpp | 3 ++- src/complex/Filter/Actions/CreateGeometry2DAction.hpp | 3 ++- src/complex/Filter/Actions/CreateGeometry3DAction.hpp | 3 ++- src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/complex/Filter/Actions/CreateGeometry1DAction.hpp b/src/complex/Filter/Actions/CreateGeometry1DAction.hpp index c2e3a44351..218c328c9a 100644 --- a/src/complex/Filter/Actions/CreateGeometry1DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry1DAction.hpp @@ -244,7 +244,8 @@ class CreateGeometry1DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry1DAction(getCreatedPath(), m_NumEdges, m_NumVertices, m_VertexDataName, m_EdgeDataName, m_SharedVerticesName, m_SharedEdgesName)); + auto action = + std::unique_ptr(new CreateGeometry1DAction(getCreatedPath(), m_NumEdges, m_NumVertices, m_VertexDataName, m_EdgeDataName, m_SharedVerticesName, m_SharedEdgesName)); action->m_InputVertices = m_InputVertices; action->m_InputEdges = m_InputEdges; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateGeometry2DAction.hpp b/src/complex/Filter/Actions/CreateGeometry2DAction.hpp index 9ca0ac6f78..9fb181a4fa 100644 --- a/src/complex/Filter/Actions/CreateGeometry2DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry2DAction.hpp @@ -244,7 +244,8 @@ class CreateGeometry2DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry2DAction(getCreatedPath(), m_NumFaces, m_NumVertices, m_VertexDataName, m_FaceDataName, m_SharedVerticesName, m_SharedFacesName)); + auto action = + std::unique_ptr(new CreateGeometry2DAction(getCreatedPath(), m_NumFaces, m_NumVertices, m_VertexDataName, m_FaceDataName, m_SharedVerticesName, m_SharedFacesName)); action->m_InputVertices = m_InputVertices; action->m_InputFaces = m_InputFaces; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateGeometry3DAction.hpp b/src/complex/Filter/Actions/CreateGeometry3DAction.hpp index 3a283b5aa4..d3c6efcf6f 100644 --- a/src/complex/Filter/Actions/CreateGeometry3DAction.hpp +++ b/src/complex/Filter/Actions/CreateGeometry3DAction.hpp @@ -243,7 +243,8 @@ class CreateGeometry3DAction : public IDataCreationAction */ UniquePointer clone() const override { - auto action = std::unique_ptr(new CreateGeometry3DAction(getCreatedPath(), m_NumCells, m_NumVertices, m_VertexDataName, m_CellDataName, m_SharedVerticesName, m_SharedCellsName)); + auto action = + std::unique_ptr(new CreateGeometry3DAction(getCreatedPath(), m_NumCells, m_NumVertices, m_VertexDataName, m_CellDataName, m_SharedVerticesName, m_SharedCellsName)); action->m_InputVertices = m_InputVertices; action->m_InputCells = m_InputCells; action->m_ArrayHandlingType = m_ArrayHandlingType; diff --git a/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp b/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp index d38163d103..6e91eb89ee 100644 --- a/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp +++ b/src/complex/Filter/Actions/CreateRectGridGeometryAction.cpp @@ -174,7 +174,8 @@ Result<> CreateRectGridGeometryAction::apply(DataStructure& dataStructure, Mode IDataAction::UniquePointer CreateRectGridGeometryAction::clone() const { - auto action = std::unique_ptr(new CreateRectGridGeometryAction(getCreatedPath(), m_NumXBoundTuples, m_NumYBoundTuples, m_NumZBoundTuples, m_CellDataName, m_XBoundsArrayName, m_YBoundsArrayName, m_ZBoundsArrayName)); + auto action = std::unique_ptr( + new CreateRectGridGeometryAction(getCreatedPath(), m_NumXBoundTuples, m_NumYBoundTuples, m_NumZBoundTuples, m_CellDataName, m_XBoundsArrayName, m_YBoundsArrayName, m_ZBoundsArrayName)); action->m_InputXBounds = m_InputXBounds; action->m_InputYBounds = m_InputYBounds; action->m_InputZBounds = m_InputZBounds;