diff options
Diffstat (limited to 'sccomp/source/solver/LpsolveSolver.cxx')
-rw-r--r-- | sccomp/source/solver/LpsolveSolver.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx index 229c5f0c3dbe..1053f53fa0ee 100644 --- a/sccomp/source/solver/LpsolveSolver.cxx +++ b/sccomp/source/solver/LpsolveSolver.cxx @@ -58,6 +58,7 @@ #include <com/sun/star/table/CellAddress.hpp> #include <unotools/resmgr.hxx> #include <rtl/math.hxx> +#include <algorithm> #include <memory> #include <vector> @@ -308,8 +309,7 @@ void SAL_CALL LpsolveSolver::solve() REAL* pResultVar = nullptr; get_ptr_variables( lp, &pResultVar ); - for (nVar=0; nVar<nVariables; nVar++) - maSolution[nVar] = pResultVar[nVar]; + std::copy_n(pResultVar, nVariables, maSolution.getArray()); mfResultValue = get_objective( lp ); } |