From 0fa827dbb2147d1d3850b2181eb6ab6a02a04500 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Sat, 27 Jan 2024 15:42:54 +0600 Subject: Drop std::as_const from css::uno::Sequence iterations Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sccomp/source/solver/CoinMPSolver.cxx | 4 ++-- sccomp/source/solver/LpsolveSolver.cxx | 6 +++--- sccomp/source/solver/SwarmSolver.cxx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'sccomp') diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx index a6b423d2d4a2..97ed9005be82 100644 --- a/sccomp/source/solver/CoinMPSolver.cxx +++ b/sccomp/source/solver/CoinMPSolver.cxx @@ -76,7 +76,7 @@ void SAL_CALL CoinMPSolver::solve() ScSolverCellHashMap aCellsHash; aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { table::CellAddress aCellAddr = rConstr.Left; aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side @@ -259,7 +259,7 @@ void SAL_CALL CoinMPSolver::solve() // apply single-var integer constraints - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : 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 78cd25e81167..9a21ea43a2b6 100644 --- a/sccomp/source/solver/LpsolveSolver.cxx +++ b/sccomp/source/solver/LpsolveSolver.cxx @@ -112,7 +112,7 @@ void SAL_CALL LpsolveSolver::solve() ScSolverCellHashMap aCellsHash; aCellsHash[maObjective].reserve( nVariables + 1 ); // objective function - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { table::CellAddress aCellAddr = rConstr.Left; aCellsHash[aCellAddr].reserve( nVariables + 1 ); // constraints: left hand side @@ -197,7 +197,7 @@ void SAL_CALL LpsolveSolver::solve() set_add_rowmode(lp, TRUE); - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : maConstraints) { // integer constraints are set later sheet::SolverConstraintOperator eOp = rConstr.Operator; @@ -265,7 +265,7 @@ void SAL_CALL LpsolveSolver::solve() // apply single-var integer constraints - for (const auto& rConstr : std::as_const(maConstraints)) + for (const auto& rConstr : 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 4aac9f81e23e..01814e6f44ea 100644 --- a/sccomp/source/solver/SwarmSolver.cxx +++ b/sccomp/source/solver/SwarmSolver.cxx @@ -522,14 +522,14 @@ void SAL_CALL SwarmSolver::solve() } // Determine variable bounds - for (sheet::SolverConstraint const& rConstraint : std::as_const(maConstraints)) + for (sheet::SolverConstraint const& rConstraint : maConstraints) { table::CellAddress aLeftCellAddress = rConstraint.Left; sheet::SolverConstraintOperator eOp = rConstraint.Operator; size_t index = 0; bool bFoundVariable = false; - for (const table::CellAddress& rVariableCell : std::as_const(maVariables)) + for (const table::CellAddress& rVariableCell : maVariables) { if (aLeftCellAddress == rVariableCell) { -- cgit