From a0c0488d28a9ca84b8f9e612a59431eba919ecab Mon Sep 17 00:00:00 2001 From: Alberto-o Date: Tue, 21 Jul 2026 10:33:19 +0200 Subject: [PATCH] Changes arguments passed by value to reference --- src/core/Staircaser.cpp | 4 ++-- src/core/Staircaser.h | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/Staircaser.cpp b/src/core/Staircaser.cpp index 40c9d00..f51f2af 100644 --- a/src/core/Staircaser.cpp +++ b/src/core/Staircaser.cpp @@ -448,7 +448,7 @@ bool Staircaser::isAllCoordinatesOnTheSameCellBoundary(const Element& newElement return !commonStructuredCells.empty(); } -std::set Staircaser::getElementsConvertedInLines(Cell cell, std::map> cellElemMap) { +std::set Staircaser::getElementsConvertedInLines(const Cell cell, const std::map>& cellElemMap) { std::set elementsConvertedInLines; for (const auto& e : cellElemMap.at(cell)) { @@ -492,7 +492,7 @@ std::set Staircaser::getElementsConvertedInLines(Cell cell, std::map elementsConvertedInLines, Group& meshGroup, const Cell cell, std::map> cellElemMap, std::vector> toRemove) { +void Staircaser::splitLinesWithNeighborTriangle(const size_t groupIndex, std::set elementsConvertedInLines, Group& meshGroup, const Cell cell, const std::map>& cellElemMap, std::vector> toRemove) { for (const auto& e: elementsConvertedInLines) { bool processed = false; for (const auto& otherElementsInCell: cellElemMap.at(cell)) { diff --git a/src/core/Staircaser.h b/src/core/Staircaser.h index a0a94e4..c836822 100644 --- a/src/core/Staircaser.h +++ b/src/core/Staircaser.h @@ -78,10 +78,12 @@ class Staircaser : public utils::GridTools { void fillGaps(const RelativePairSet boundaryCoordinatePairs); std::pair obtainNewIndexForElement(const Element& e, const std::set& cellsToStructure, CoordinateMap& coordinateMap); bool isAllCoordinatesOnTheSameCellBoundary(const Element& newElement, const std::set& cellsToStructure); - std::set getElementsConvertedInLines(const Cell cell, std::map> cellElemMap); - void splitLinesWithNeighborTriangle(const size_t groupIndex, std::set elementsConvertedInLines, Group& meshGroup, const Cell cell, std::map> cellElemMap, std::vector> toRemove); + std::set getElementsConvertedInLines(const Cell cell, const std::map>& cellElemMap); + void splitLinesWithNeighborTriangle(const size_t groupIndex, std::set elementsConvertedInLines, Group& meshGroup, const Cell cell, const std::map>& cellElemMap, std::vector> toRemove); }; + + } } \ No newline at end of file