Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
nyoungbq committed Oct 17, 2023
1 parent 635e6d6 commit 9bb5a55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<TriangleGeom>(m_InputValues->TriangleGeometry);
const auto& originalTriangle = m_DataStructure.getDataRefAs<TriangleGeom>(m_InputValues->TriangleGeometry);
const auto& mask = m_DataStructure.getDataRefAs<BoolArray>(m_InputValues->MaskArrayPath);
auto& reducedTriangle = m_DataStructure.getDataRefAs<TriangleGeom>(m_InputValues->ReducedTriangleGeometry);
auto& mask = m_DataStructure.getDataRefAs<BoolArray>(m_InputValues->MaskArrayPath);

// Set up allocated masks
auto size = originalTriangle.getNumberOfFaces();
usize size = originalTriangle.getNumberOfFaces();
std::vector<usize> newTrianglesIndexList;
newTrianglesIndexList.reserve(size);

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/complex/Utilities/DataArrayUtilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<AttributeMatrix>(arrayPath.getParent());
if(parentAM != nullptr)
Expand Down

0 comments on commit 9bb5a55

Please sign in to comment.