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

@@ -663,12 +663,11 @@ void RigEclipseCaseData::computeActiveCellsGeometryBoundingBoxSlow()
}
else
{
std::array<cvf::Vec3d, 8> hexCorners;
for ( size_t i = 0; i < m_mainGrid->cellCount(); i++ )
{
if ( activeInfos[acIdx]->isActive( i ) )
{
m_mainGrid->cellCornerVertices( i, hexCorners );
std::array<cvf::Vec3d, 8> hexCorners = m_mainGrid->cellCornerVertices( i );
for ( const auto& corner : hexCorners )
{
bb.add( corner );
@@ -731,8 +730,7 @@ void RigEclipseCaseData::computeActiveCellsGeometryBoundingBoxOptimized()
{
size_t cellIndex = m_mainGrid->cellIndexFromIJK( i, j, k );
std::array<cvf::Vec3d, 8> hexCorners;
m_mainGrid->cellCornerVertices( cellIndex, hexCorners );
std::array<cvf::Vec3d, 8> hexCorners = m_mainGrid->cellCornerVertices( cellIndex );
for ( const auto& corner : hexCorners )
{
bb.add( corner );