From ff6e8c73adef7c86db12287948025954a4fc7746 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 20 Aug 2019 11:16:20 +0200 Subject: loplugin:constvars in sccomp..sd Change-Id: Ic4b2a1d23da80a5b0976692f490c29a7169be3ef Reviewed-on: https://gerrit.libreoffice.org/77793 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sccomp/source/solver/SwarmSolver.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sccomp/source') diff --git a/sccomp/source/solver/SwarmSolver.cxx b/sccomp/source/solver/SwarmSolver.cxx index 25bccc57970b..6652127dc9b2 100644 --- a/sccomp/source/solver/SwarmSolver.cxx +++ b/sccomp/source/solver/SwarmSolver.cxx @@ -400,7 +400,7 @@ size_t SwarmSolver::getDimensionality() { return maVariables.getLength(); } bool SwarmSolver::doesViolateConstraints() { - for (sheet::SolverConstraint& rConstraint : maNonBoundedConstraints) + for (const sheet::SolverConstraint& rConstraint : maNonBoundedConstraints) { double fLeftValue = getValue(rConstraint.Left); double fRightValue = 0.0; @@ -520,7 +520,7 @@ void SAL_CALL SwarmSolver::solve() size_t index = 0; bool bFoundVariable = false; - for (table::CellAddress& rVariableCell : maVariables) + for (const table::CellAddress& rVariableCell : std::as_const(maVariables)) { if (aLeftCellAddress == rVariableCell) { -- cgit