From 06fce4502e282b531ed97f8ce90e841917dcedc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Omn=C3=A8s?= <26088210+flomnes@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:06:40 +0100 Subject: [PATCH] Simplify for loop a bit (#2003) ```diff 1c1 < CorrespondanceDesVariables.NumeroDeVariableVolume[0] = Var; --- > CorrespondanceDesVariables.NumeroDeVariableVolume[Pdt] = Var; 6c6 < = &(DonneesAnnuelles.Volume[0]); --- > = &(DonneesAnnuelles.Volume[Pdt]); ``` --- .../hydro/monthly/h2o_m_construire_les_variables.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/solver/hydro/monthly/h2o_m_construire_les_variables.cpp b/src/solver/hydro/monthly/h2o_m_construire_les_variables.cpp index aeb3ad1726..534e8c236e 100644 --- a/src/solver/hydro/monthly/h2o_m_construire_les_variables.cpp +++ b/src/solver/hydro/monthly/h2o_m_construire_les_variables.cpp @@ -46,15 +46,7 @@ void H2O_M_ConstruireLesVariables(DONNEES_ANNUELLES& DonneesAnnuelles) const int NbPdt = DonneesAnnuelles.NombreDePasDeTemps; int Var = 0; - CorrespondanceDesVariables.NumeroDeVariableVolume[0] = Var; - ProblemeLineairePartieVariable.Xmin[Var] = 0.0; - ProblemeLineairePartieVariable.Xmax[Var] = 1.0; - ProblemeLineairePartieFixe.TypeDeVariable[Var] = VARIABLE_BORNEE_DES_DEUX_COTES; - ProblemeLineairePartieVariable.AdresseOuPlacerLaValeurDesVariablesOptimisees[Var] - = &(DonneesAnnuelles.Volume[0]); - Var++; - - for (int Pdt = 1; Pdt < NbPdt; Pdt++) + for (int Pdt = 0; Pdt < NbPdt; Pdt++) { CorrespondanceDesVariables.NumeroDeVariableVolume[Pdt] = Var; ProblemeLineairePartieVariable.Xmin[Var] = 0.0;