diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-29 09:59:24 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-10-30 21:55:34 +0200 |
commit | 881ea76399a76599e17688f335f4f164d4d29413 (patch) | |
tree | 97be2e9f91ec8f5b47662580335bce1c6090a5d5 /sccomp/source | |
parent | 83f50dee5b4add87cf30903aeb0e44e0d4f04682 (diff) |
Prepare for removal of non-const operator[] from Sequence in sccomp
Change-Id: Ic55d553c85dd0abb92b6b7f223a437c8c2ca0700
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124383
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sccomp/source')
-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 ); } |