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:
Kristian Bendiksen committed 2025-09-03 14:21:19 +02:00
1 parent da69eef72b
commit 10182e99a7
41 files changed
+148 -214

No files matched your search

@@ -178,8 +178,7 @@ void RivFaultGeometryGenerator::computeArrays( bool onlyShowFacesWithDefinedNeig
{
int myThread = RiaOpenMPTools::currentThreadIndex();
std::array<cvf::Vec3d, 8> cornerVerts;
cvf::ubyte faceConn[4];
cvf::ubyte faceConn[4];
// NB! We are inside a parallel section, do not use "parallel for" here
#pragma omp for
@@ -200,7 +199,7 @@ void RivFaultGeometryGenerator::computeArrays( bool onlyShowFacesWithDefinedNeig
if ( onlyShowFacesWithDefinedNeighbors && !hasConnection( cellIndex, face, connections, connIndices ) ) continue;
m_grid->cellCornerVertices( cellIndex, cornerVerts );
std::array<cvf::Vec3d, 8> cornerVerts = m_grid->cellCornerVertices( cellIndex );
cvf::StructGridInterface::cellFaceVertexIndices( face, faceConn );
for ( int n = 0; n < 4; n++ )