diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 12:53:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-08-15 20:22:18 +0200 |
commit | f23f9d38db7e0b586130af88c7424cc3d85bc2d2 (patch) | |
tree | ba8c0129c84d768b1dcff39f6d9b05f389235ea1 /sccomp | |
parent | 16d7e22d78cdeac149ee874f803292b3e2634e0a (diff) |
loplugin:sequenceloop in scaddins..scripting
Change-Id: I25044332e107b630b257e48d95ee9272145ed344
Reviewed-on: https://gerrit.libreoffice.org/77524
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sccomp')
-rw-r--r-- | sccomp/source/solver/CoinMPSolver.cxx | 4 | ||||
-rw-r--r-- | sccomp/source/solver/LpsolveSolver.cxx | 6 | ||||
-rw-r--r-- | sccomp/source/solver/SwarmSolver.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx index f7a357e11eb9..41d3601b114e 100644 --- a/sccomp/source/solver/CoinMPSolver.cxx +++ b/sccomp/source/solver/CoinMPSolver.cxx @@ -72,7 +72,7 @@ void SAL_CALL CoinMPSolver::solve() ScSolverCellHashMap aCellsHash; aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function - for (const auto& rConstr : maConstraints) + for (const auto& rConstr : std::as_const(maConstraints)) { table::CellAddress aCellAddr = rConstr.Left; aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side @@ -255,7 +255,7 @@ void SAL_CALL CoinMPSolver::solve() // apply single-var integer constraints - for (const auto& rConstr : maConstraints) + for (const auto& rConstr : std::as_const(maConstraints)) { sheet::SolverConstraintOperator eOp = rConstr.Operator; if ( eOp == sheet::SolverConstraintOperator_INTEGER || diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx index b1ab44e66350..01f4bfba2bb1 100644 --- a/sccomp/source/solver/LpsolveSolver.cxx +++ b/sccomp/source/solver/LpsolveSolver.cxx @@ -107,7 +107,7 @@ void SAL_CALL LpsolveSolver::solve() ScSolverCellHashMap aCellsHash; aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function - for (const auto& rConstr : maConstraints) + for (const auto& rConstr : std::as_const(maConstraints)) { table::CellAddress aCellAddr = rConstr.Left; aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side @@ -192,7 +192,7 @@ void SAL_CALL LpsolveSolver::solve() set_add_rowmode(lp, TRUE); - for (const auto& rConstr : maConstraints) + for (const auto& rConstr : std::as_const(maConstraints)) { // integer constraints are set later sheet::SolverConstraintOperator eOp = rConstr.Operator; @@ -260,7 +260,7 @@ void SAL_CALL LpsolveSolver::solve() // apply single-var integer constraints - for (const auto& rConstr : maConstraints) + for (const auto& rConstr : std::as_const(maConstraints)) { sheet::SolverConstraintOperator eOp = rConstr.Operator; if ( eOp == sheet::SolverConstraintOperator_INTEGER || diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx index 1e6604245dfe..25bccc57970b 100644 --- a/sccomp/source/solver/SwarmSolver.cxx +++ b/sccomp/source/solver/SwarmSolver.cxx @@ -513,7 +513,7 @@ void SAL_CALL SwarmSolver::solve() } // Determine variable bounds - for (sheet::SolverConstraint const& rConstraint : maConstraints) + for (sheet::SolverConstraint const& rConstraint : std::as_const(maConstraints)) { table::CellAddress aLeftCellAddress = rConstraint.Left; sheet::SolverConstraintOperator eOp = rConstraint.Operator; |