From a4f1d8010d33418c3d88b855bc0646546b496006 Mon Sep 17 00:00:00 2001 From: Guillaume PIERRE Date: Fri, 4 Oct 2024 19:12:56 +0200 Subject: [PATCH] Trial to simplify solver call : crash correction --- src/solver/utils/include/antares/solver/utils/ortools_wrapper.h | 2 +- src/solver/utils/ortools_utils.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solver/utils/include/antares/solver/utils/ortools_wrapper.h b/src/solver/utils/include/antares/solver/utils/ortools_wrapper.h index b7cc799db6..75a0b16bbd 100644 --- a/src/solver/utils/include/antares/solver/utils/ortools_wrapper.h +++ b/src/solver/utils/include/antares/solver/utils/ortools_wrapper.h @@ -47,6 +47,6 @@ void ORTOOLS_CorrigerLesBornes(MPSolver* ProbSpx, const double* bMax, const int* typeVar, int nbVar); -void ORTOOLS_LibererProbleme(MPSolver* ProbSpx); +void ORTOOLS_LibererProbleme(MPSolver*& ProbSpx); #endif diff --git a/src/solver/utils/ortools_utils.cpp b/src/solver/utils/ortools_utils.cpp index 2c7b9ac39e..f4a2f16b5d 100644 --- a/src/solver/utils/ortools_utils.cpp +++ b/src/solver/utils/ortools_utils.cpp @@ -424,7 +424,7 @@ void ORTOOLS_CorrigerLesBornes(MPSolver* solver, } } -void ORTOOLS_LibererProbleme(MPSolver* solver) +void ORTOOLS_LibererProbleme(MPSolver*& solver) { delete solver; solver = nullptr;