diff --git a/src/solver/hydro/management/management.cpp b/src/solver/hydro/management/management.cpp index 7a16249a43..6dcc8b1f44 100644 --- a/src/solver/hydro/management/management.cpp +++ b/src/solver/hydro/management/management.cpp @@ -202,7 +202,7 @@ void HydroManagement::prepareEffectiveDemand( HydroSpecificMap& hydro_specific_map) { areas_.each( - [this](Data::Area& area) + [this, &year](Data::Area& area) { auto& data = area.hydro.managementData[year]; auto& hydro_specific = hydro_specific_map[&area];