From 9aa3b33bb5114bb458d5f392a60532f705232730 Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Wed, 31 Jan 2024 17:56:56 -0500 Subject: [PATCH] Minor code clean up. Signed-off-by: Michael Jackson --- .../Filters/Algorithms/LabelTriangleGeometry.cpp | 12 ++++++------ .../Filters/LabelTriangleGeometryFilter.cpp | 6 +++--- .../Filters/LabelTriangleGeometryFilter.hpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/LabelTriangleGeometry.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/LabelTriangleGeometry.cpp index 6b881288a1..51484dd467 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/LabelTriangleGeometry.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/LabelTriangleGeometry.cpp @@ -41,7 +41,7 @@ Result<> LabelTriangleGeometry::operator()() return MakeErrorResult(check, fmt::format("Error finding element neighbors for {} geometry", triangle.getName())); } - const TriangleGeom::ElementDynamicList* triangleNeighbors = triangle.getElementNeighbors(); + const TriangleGeom::ElementDynamicList* triangleNeighborsPtr = triangle.getElementNeighbors(); auto& regionIds = m_DataStructure.getDataRefAs(m_InputValues->RegionIdsPath); @@ -57,22 +57,22 @@ Result<> LabelTriangleGeometry::operator()() triangleCounts[regionCount]++; usize size = 0; - triList[size] = i; + triList[size] = static_cast(i); size++; while(size > 0) { TriangleGeom::MeshIndexType tri = triList[size - 1]; size -= 1; - uint16_t tCount = triangleNeighbors->getNumberOfElements(tri); - TriangleGeom::MeshIndexType* data = triangleNeighbors->getElementListPointer(tri); + uint16_t tCount = triangleNeighborsPtr->getNumberOfElements(tri); + TriangleGeom::MeshIndexType* dataPtr = triangleNeighborsPtr->getElementListPointer(tri); for(int j = 0; j < tCount; j++) { - TriangleGeom::MeshIndexType neighTri = data[j]; + TriangleGeom::MeshIndexType neighTri = dataPtr[j]; if(regionIds[neighTri] == 0) { regionIds[neighTri] = regionCount; triangleCounts[regionCount]++; - triList[size] = neighTri; + triList[size] = static_cast(neighTri); size++; if(size >= triList.size()) { diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.cpp index 6a0d5b117f..728f983b8b 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.cpp @@ -86,12 +86,12 @@ IFilter::PreflightResult LabelTriangleGeometryFilter::preflightImpl(const DataSt std::vector preflightUpdatedValues; { - const auto* triangleGeom = dataStructure.getDataAs(pTriangleGeomPathValue); - if(triangleGeom == nullptr) + const auto* triangleGeomPtr = dataStructure.getDataAs(pTriangleGeomPathValue); + if(triangleGeomPtr == nullptr) { return MakePreflightErrorResult(-34510, fmt::format("{} is not a valid Triangle Geometry", pTriangleGeomPathValue.toString())); } - usize numTris = triangleGeom->getNumberOfFaces(); + usize numTris = triangleGeomPtr->getNumberOfFaces(); auto createArrayAction = std::make_unique(DataType::int32, std::vector{numTris}, std::vector{1}, pRegionIdsNameValue); resultOutputActions.value().appendAction(std::move(createArrayAction)); } diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.hpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.hpp index 708701db55..e90ba2db5f 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.hpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/LabelTriangleGeometryFilter.hpp @@ -9,7 +9,7 @@ namespace nx::core { /** * @class LabelTriangleGeometryFilter - * @brief This filter will .... + * @brief */ class SIMPLNXCORE_EXPORT LabelTriangleGeometryFilter : public IFilter {