Merge pull request #3777 from akva2/fix_perf_range_deref

fixed: pass through perf-range as an optional
This commit is contained in:
Bård Skaflestad 2023-11-17 14:02:58 +01:00 committed by GitHub
commit a74b146841
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 4 deletions

View File

@ -151,7 +151,7 @@ namespace RestartIO {
void updateSegment(int segment_number_arg, void updateSegment(int segment_number_arg,
double center_depth_arg, double center_depth_arg,
std::size_t compseg_insert_index, std::size_t compseg_insert_index,
const std::pair<double,double>& perf_range); const std::optional<std::pair<double,double>>& perf_range);
std::size_t sort_value() const; std::size_t sort_value() const;
const bool& getDefaultSatTabId() const; const bool& getDefaultSatTabId() const;
void setDefaultSatTabId(bool id); void setDefaultSatTabId(bool id);

View File

@ -331,7 +331,8 @@ namespace {
connection.updateSegment(compseg.segment_number, connection.updateSegment(compseg.segment_number,
cdepth, cdepth,
compseg.m_seqIndex, compseg.m_seqIndex,
{ compseg.m_distance_start, compseg.m_distance_end }); std::make_pair(compseg.m_distance_start,
compseg.m_distance_end));
} }
} }

View File

@ -281,7 +281,7 @@ const std::optional<std::pair<double, double>>& Connection::perf_range() const {
void Connection::updateSegment(int segment_number_arg, void Connection::updateSegment(int segment_number_arg,
double center_depth_arg, double center_depth_arg,
std::size_t compseg_insert_index, std::size_t compseg_insert_index,
const std::pair<double, double>& perf_range) { const std::optional<std::pair<double, double>>& perf_range) {
this->segment_number = segment_number_arg; this->segment_number = segment_number_arg;
this->center_depth = center_depth_arg; this->center_depth = center_depth_arg;
this->m_sort_value = compseg_insert_index; this->m_sort_value = compseg_insert_index;

View File

@ -519,7 +519,7 @@ namespace Opm {
prev->updateSegment(conSegNo, prev->updateSegment(conSegNo,
depth, depth,
css_ind, css_ind,
*perf_range); perf_range);
} }
} }
} }