mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#10648 Refactor summary reader: return std::vector<double> instead of taking ptr.
This commit is contained in:
@@ -523,11 +523,10 @@ std::vector<std::pair<RigEnsembleParameter, double>>
|
||||
|
||||
if ( !summaryCase->caseRealizationParameters() ) continue;
|
||||
|
||||
std::vector<double> values;
|
||||
|
||||
double closestValue = std::numeric_limits<double>::infinity();
|
||||
time_t closestTimeStep = 0;
|
||||
if ( reader->values( address, &values ) )
|
||||
auto [isOk, values] = reader->values( address );
|
||||
if ( isOk )
|
||||
{
|
||||
const std::vector<time_t>& timeSteps = reader->timeSteps( address );
|
||||
for ( size_t i = 0; i < timeSteps.size(); ++i )
|
||||
@@ -967,8 +966,7 @@ void RimSummaryCaseCollection::computeMinMax( const RifEclipseSummaryAddress& ad
|
||||
{
|
||||
if ( !s->summaryReader() ) continue;
|
||||
|
||||
std::vector<double> values;
|
||||
s->summaryReader()->values( address, &values );
|
||||
auto [isOk, values] = s->summaryReader()->values( address );
|
||||
if ( values.empty() ) continue;
|
||||
|
||||
const auto [min, max] = std::minmax_element( values.begin(), values.end() );
|
||||
|
||||
Reference in New Issue
Block a user