Use reference when accessing Schedule actions

This commit is contained in:
Joakim Hove
2020-03-23 08:34:50 +01:00
parent 8a420d30e6
commit d1527da245
2 changed files with 2 additions and 2 deletions

View File

@@ -637,7 +637,7 @@ captureDeclaredActionxData( const Opm::Schedule& sched,
const std::vector<int>& actDims,
const std::size_t simStep)
{
const auto acts = sched.actions(simStep);
const auto& acts = sched.actions(simStep);
std::size_t act_ind = 0;
for (auto actx_it = acts.begin(); actx_it < acts.end(); actx_it++) {
{

View File

@@ -722,7 +722,7 @@ namespace {
act_res_stat(const Opm::Schedule& sched, const Opm::SummaryState& smry, const std::size_t sim_step) {
std::vector<Opm::Action::Result> act_res;
std::vector<std::string> act_name;
const auto acts = sched.actions(sim_step);
const auto& acts = sched.actions(sim_step);
Opm::Action::Context context(smry);
auto sim_time = sched.simTime(sim_step);
for (const auto& action : acts.pending(sim_time)) {