diff --git a/src/solver/hydro/daily/h2o_j_instanciation.cpp b/src/solver/hydro/daily/h2o_j_instanciation.cpp index fac90f4c3c..7065756843 100644 --- a/src/solver/hydro/daily/h2o_j_instanciation.cpp +++ b/src/solver/hydro/daily/h2o_j_instanciation.cpp @@ -30,7 +30,7 @@ DONNEES_MENSUELLES* H2O_J_Instanciation(void) { - DONNEES_MENSUELLES* DonneesMensuelles = new DONNEES_MENSUELLES;; + DONNEES_MENSUELLES* DonneesMensuelles = new DONNEES_MENSUELLES; PROBLEME_HYDRAULIQUE& ProblemeHydraulique = DonneesMensuelles->ProblemeHydraulique; diff --git a/src/solver/hydro/management/daily.cpp b/src/solver/hydro/management/daily.cpp index 25aa8116e4..aa827b8913 100644 --- a/src/solver/hydro/management/daily.cpp +++ b/src/solver/hydro/management/daily.cpp @@ -391,28 +391,28 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St uint firstDay = study.calendar.months[simulationMonth].daysYear.first; uint endDay = firstDay + daysPerMonth; - DONNEES_MENSUELLES& problem = *H2O_J_Instanciation(); - H2O_J_AjouterBruitAuCout(problem); - problem.NombreDeJoursDuMois = (int)daysPerMonth; - problem.TurbineDuMois = data.MOG[realmonth]; + DONNEES_MENSUELLES* problem = H2O_J_Instanciation(); + H2O_J_AjouterBruitAuCout(*problem); + problem->NombreDeJoursDuMois = (int)daysPerMonth; + problem->TurbineDuMois = data.MOG[realmonth]; uint dayMonth = 0; for (uint day = firstDay; day != endDay; ++day) { - problem.TurbineMax[dayMonth] = maxP[day] * maxE[day]; - problem.TurbineMin[dayMonth] = data.dailyMinGen[day]; - problem.TurbineCible[dayMonth] = dailyTargetGen[day]; + problem->TurbineMax[dayMonth] = maxP[day] * maxE[day]; + problem->TurbineMin[dayMonth] = data.dailyMinGen[day]; + problem->TurbineCible[dayMonth] = dailyTargetGen[day]; dayMonth++; } - H2O_J_OptimiserUnMois(&problem); - switch (problem.ResultatsValides) + H2O_J_OptimiserUnMois(problem); + switch (problem->ResultatsValides) { case OUI: dayMonth = 0; for (uint day = firstDay; day != endDay; ++day) { - valgen.HydrauliqueModulableQuotidien[day] = problem.Turbine[dayMonth]; + valgen.HydrauliqueModulableQuotidien[day] = problem->Turbine[dayMonth]; dayMonth++; } break; @@ -424,7 +424,7 @@ inline void HydroManagement::prepareDailyOptimalGenerations(Solver::Variable::St break; } - H2O_J_Free(&problem); + H2O_J_Free(problem); #ifndef NDEBUG for (uint day = firstDay; day != endDay; ++day)