diff --git a/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/RemoveFlaggedTriangles.cpp b/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/RemoveFlaggedTriangles.cpp index 78e9459c68..d0d72b2db9 100644 --- a/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/RemoveFlaggedTriangles.cpp +++ b/src/Plugins/ComplexCore/src/ComplexCore/Filters/Algorithms/RemoveFlaggedTriangles.cpp @@ -79,12 +79,12 @@ const std::atomic_bool& RemoveFlaggedTriangles::getCancel() Result<> RemoveFlaggedTriangles::operator()() { // Remove Triangles from reduced according to removeTrianglesIndex - auto& originalTriangle = m_DataStructure.getDataRefAs(m_InputValues->TriangleGeometry); + const auto& originalTriangle = m_DataStructure.getDataRefAs(m_InputValues->TriangleGeometry); + const auto& mask = m_DataStructure.getDataRefAs(m_InputValues->MaskArrayPath); auto& reducedTriangle = m_DataStructure.getDataRefAs(m_InputValues->ReducedTriangleGeometry); - auto& mask = m_DataStructure.getDataRefAs(m_InputValues->MaskArrayPath); // Set up allocated masks - auto size = originalTriangle.getNumberOfFaces(); + usize size = originalTriangle.getNumberOfFaces(); std::vector newTrianglesIndexList; newTrianglesIndexList.reserve(size); @@ -150,8 +150,7 @@ Result<> RemoveFlaggedTriangles::operator()() } // Set up preprocessing conditions (allocation for parallelization) - size = newTrianglesIndexList.size(); - reducedTriangle.resizeFaceList(size); // resize accordingly + reducedTriangle.resizeFaceList(newTrianglesIndexList.size()); // resize accordingly // parse triangles and reassign indexes to match new vertex list ParallelDataAlgorithm dataAlg; diff --git a/src/complex/Utilities/DataArrayUtilities.cpp b/src/complex/Utilities/DataArrayUtilities.cpp index 86f954d758..a3f13b8e44 100644 --- a/src/complex/Utilities/DataArrayUtilities.cpp +++ b/src/complex/Utilities/DataArrayUtilities.cpp @@ -239,7 +239,7 @@ Result<> ValidateNumFeaturesInArray(const DataStructure& dataStructure, const Da { results = MergeResults(results, MakeErrorResult(-5552, fmt::format("The number of Features ({}) in the Feature Data array at path '{}' does not match the largest Feature Id in the FeatureIds array {}", - numFeatures, arrayPath.toString(), largestFeature))); + numFeatures - 1, arrayPath.toString(), largestFeature))); const auto* parentAM = dataStructure.getDataAs(arrayPath.getParent()); if(parentAM != nullptr)