From b5618092a5ece25530138e57aacad963968e5d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= Date: Fri, 11 Oct 2024 14:00:29 +0200 Subject: [PATCH] Add a few const ref qualifiers to improve code readibility (#2459) --- src/solver/simulation/common-hydro-remix.cpp | 2 +- .../solver/simulation/sim_structure_probleme_economique.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/solver/simulation/common-hydro-remix.cpp b/src/solver/simulation/common-hydro-remix.cpp index de8e3f5328..be94eba549 100644 --- a/src/solver/simulation/common-hydro-remix.cpp +++ b/src/solver/simulation/common-hydro-remix.cpp @@ -59,7 +59,7 @@ static bool Remix(const Data::AreaList& areas, auto& D = weeklyResults.ValeursHorairesDeDefaillancePositive; - auto& S = weeklyResults.ValeursHorairesDeDefaillanceNegative; + const auto& S = weeklyResults.ValeursHorairesDeDefaillanceNegative; auto& H = weeklyResults.TurbinageHoraire; diff --git a/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h b/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h index aa46e5962d..29dd7c38f5 100644 --- a/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h +++ b/src/solver/simulation/include/antares/solver/simulation/sim_structure_probleme_economique.h @@ -333,18 +333,18 @@ class computeTimeStepLevel double capacity; std::vector& inflows; std::vector& ovf; - std::vector& turb; + const std::vector& turb; double pumpRatio; - std::vector& pump; + const std::vector& pump; double excessDown; public: computeTimeStepLevel(const double& startLvl, std::vector& infl, std::vector& overfl, - std::vector& H, + const std::vector& H, double pumpEff, - std::vector& Pump, + const std::vector& Pump, double rc): step(0), level(startLvl),