mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 23:53:04 -06:00
#1926 Fishbones Export : Guard input values to std::vector::reserve()
This commit is contained in:
parent
d83c468033
commit
edd39b6ff1
@ -138,6 +138,9 @@ void RigEclipseWellLogExtractor::curveData(const RigResultAccessor* resultAccess
|
||||
std::vector<WellPathCellIntersectionInfo> RigEclipseWellLogExtractor::cellIntersectionInfo()
|
||||
{
|
||||
std::vector<WellPathCellIntersectionInfo> cellIntersectionInfos;
|
||||
|
||||
if (m_intersections.size() > 1)
|
||||
{
|
||||
cellIntersectionInfos.reserve(m_intersections.size()-1);
|
||||
|
||||
for (size_t cpIdx = 0; cpIdx < m_intersections.size()-1; ++cpIdx)
|
||||
@ -153,6 +156,7 @@ std::vector<WellPathCellIntersectionInfo> RigEclipseWellLogExtractor::cellInters
|
||||
cellIntersectionInfos.push_back(WellPathCellIntersectionInfo(cellIdx1, m_intersections[cpIdx], m_intersections[cpIdx+1], internalCellLengths));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return cellIntersectionInfos;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user