mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Fix unintentional short-circuit plus a couple of minor nits
This commit is contained in:
parent
74fa148cd7
commit
1c315b0018
@ -448,7 +448,7 @@ update_gconsump(const Schedule& schedule, const int report_step, const SummarySt
|
|||||||
if (sched_state.groups.has(group_name)) {
|
if (sched_state.groups.has(group_name)) {
|
||||||
for (const auto& child_gname : sched_state.groups(group_name).groups()) {
|
for (const auto& child_gname : sched_state.groups(group_name).groups()) {
|
||||||
const auto gefac = sched_state.groups(child_gname).getGroupEfficiencyFactor();
|
const auto gefac = sched_state.groups(child_gname).getGroupEfficiencyFactor();
|
||||||
has_values = has_values || self(self, child_gname, rates, gefac);
|
has_values = self(self, child_gname, rates, gefac) || has_values;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,11 +461,11 @@ update_gconsump(const Schedule& schedule, const int report_step, const SummarySt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update map if values are set
|
// Update map if values are set
|
||||||
if (has_values) this->m_gconsump_rates[group_name] = rates;
|
if (has_values) this->m_gconsump_rates.insert_or_assign(group_name, rates);
|
||||||
return has_values;
|
return has_values;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::pair<Scalar, Scalar> rates = {0.0, 0.0};
|
auto rates = std::pair { Scalar{0}, Scalar{0} };
|
||||||
gcr_recursive(gcr_recursive, "FIELD", rates);
|
gcr_recursive(gcr_recursive, "FIELD", rates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user