mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Performance : Move object allocation outside loop
This commit is contained in:
@@ -104,9 +104,9 @@ size_t RigMainGrid::findReservoirCellIndexFromPoint(const cvf::Vec3d& point) con
|
||||
std::vector<size_t> cellIndices;
|
||||
m_mainGrid->findIntersectingCells(pointBBox, &cellIndices);
|
||||
|
||||
cvf::Vec3d hexCorners[8];
|
||||
for (size_t cellIndex : cellIndices)
|
||||
{
|
||||
cvf::Vec3d hexCorners[8];
|
||||
m_mainGrid->cellCornerVertices(cellIndex, hexCorners);
|
||||
|
||||
if (RigHexIntersectionTools::isPointInCell(point, hexCorners))
|
||||
|
||||
Reference in New Issue
Block a user