mirror of
https://github.com/OPM/ResInsight.git
synced 2026-11-04 21:27:04 -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
@@ -78,19 +78,17 @@ bool RivEclipseIntersectionGrid::useCell( size_t cellIndex ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivEclipseIntersectionGrid::cellCornerVertices( size_t cellIndex, std::array<cvf::Vec3d, 8>& cellCorners ) const
|
||||
std::array<cvf::Vec3d, 8> RivEclipseIntersectionGrid::cellCornerVertices( size_t cellIndex ) const
|
||||
{
|
||||
m_mainGrid->cellCornerVertices( cellIndex, cellCorners );
|
||||
return m_mainGrid->cellCornerVertices( cellIndex );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivEclipseIntersectionGrid::cellCornerIndices( size_t cellIndex, std::array<size_t, 8>& cornerIndices ) const
|
||||
std::array<size_t, 8> RivEclipseIntersectionGrid::cellCornerIndices( size_t cellIndex ) const
|
||||
{
|
||||
const std::array<size_t, 8>& cornerIndicesSource = m_mainGrid->cell( cellIndex ).cornerIndices();
|
||||
|
||||
cornerIndices = cornerIndicesSource;
|
||||
return m_mainGrid->cell( cellIndex ).cornerIndices();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user