mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-08 23:35:03 -06:00
Refactor: Change RigGridBase::cellCornerVertices to return std::array
Refactored RigGridBase::cellCornerVertices to return std::array<cvf::Vec3d, 8> by value instead of taking a reference to std::array as an output parameter. This change improves code readability and leverages modern C++ return value optimizations. Updated all call sites across the codebase to reflect the new function signature.
This commit is contained in:
1 parent
da69eef72b
commit
10182e99a7
41 files changed
+148
-214
No files matched your search
+2
-5
@@ -197,9 +197,6 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
|
||||
cvf::Plane plane;
|
||||
plane.setFromPoints( p0, p1, p2 );
|
||||
|
||||
std::array<cvf::Vec3d, 8> cellCorners;
|
||||
std::array<size_t, 8> cornerIndices;
|
||||
|
||||
for ( size_t globalCellIdx : triIntersectedCellCandidates )
|
||||
{
|
||||
if ( !m_hexGrid->useCell( globalCellIdx ) ) continue;
|
||||
@@ -208,8 +205,8 @@ void RivSurfaceIntersectionGeometryGenerator::calculateArrays()
|
||||
cellFaceForEachTriangleEdge.clear();
|
||||
cellCutTriangles.clear();
|
||||
|
||||
m_hexGrid->cellCornerVertices( globalCellIdx, cellCorners );
|
||||
m_hexGrid->cellCornerIndices( globalCellIdx, cornerIndices );
|
||||
const std::array<cvf::Vec3d, 8> cellCorners = m_hexGrid->cellCornerVertices( globalCellIdx );
|
||||
const std::array<size_t, 8> cornerIndices = m_hexGrid->cellCornerIndices( globalCellIdx );
|
||||
|
||||
int triangleCount = caf::HexGridIntersectionTools::planeHexIntersectionMCTet( plane,
|
||||
cellCorners,
|
||||
|
||||
Reference in new issue
Block a user