From 4739821cb457ca4bb9c6e49967217b0c47e6750b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Wed, 6 Nov 2024 17:35:37 +0100 Subject: [PATCH] Don't Pass Action::Result By Value Into Add_Run() This is no longer needed so we can go back to using 'const' objects. --- opm/simulators/flow/ActionHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opm/simulators/flow/ActionHandler.cpp b/opm/simulators/flow/ActionHandler.cpp index 4aec0c5d7..4c56be92b 100644 --- a/opm/simulators/flow/ActionHandler.cpp +++ b/opm/simulators/flow/ActionHandler.cpp @@ -224,7 +224,7 @@ applyActions(const int reportStep, auto non_triggered = 0; const auto simTime = asTimeT(now); for (const auto& action : actions.pending(this->actionState_, simTime)) { - auto actionResult = action->eval(context); + const auto actionResult = action->eval(context); if (! actionResult) { ++non_triggered; logInactiveAction(action->name(), ts); @@ -243,7 +243,7 @@ applyActions(const int reportStep, .applyAction(reportStep, *action, matching_wells, wellpi); this->applySimulatorUpdate(reportStep, sim_update, transUp, commit_wellstate); - this->actionState_.add_run(*action, simTime, std::move(actionResult)); + this->actionState_.add_run(*action, simTime, actionResult); } if (non_triggered > 0) {