summaryrefslogtreecommitdiff
path: root/sccomp/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-05-06 19:57:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-06 21:52:00 +0200
commit18715f6a63af55045b108b98abeffeae8e51518b (patch)
tree7cfcc6fc8a27c6f0c023d74fac5e43b88ac70907 /sccomp/source
parentb83a8483a1426ba400480d33f7df321fcc02e64d (diff)
remove unnecessary sequenceToContainer
If we are not going to manipulate the resulting vector, then it is actually slower, since we have to allocate more storage for the vector Change-Id: I65677007d105f4783603df74113ebed6db0b551b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sccomp/source')
-rw-r--r--sccomp/source/solver/CoinMPSolver.cxx2
-rw-r--r--sccomp/source/solver/LpsolveSolver.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sccomp/source/solver/CoinMPSolver.cxx b/sccomp/source/solver/CoinMPSolver.cxx
index 35ebf1fd19b2..a6b423d2d4a2 100644
--- a/sccomp/source/solver/CoinMPSolver.cxx
+++ b/sccomp/source/solver/CoinMPSolver.cxx
@@ -67,7 +67,7 @@ void SAL_CALL CoinMPSolver::solve()
// collect variables in vector (?)
- auto aVariableCells = comphelper::sequenceToContainer<std::vector<table::CellAddress>>(maVariables);
+ const auto & aVariableCells = maVariables;
size_t nVariables = aVariableCells.size();
size_t nVar = 0;
diff --git a/sccomp/source/solver/LpsolveSolver.cxx b/sccomp/source/solver/LpsolveSolver.cxx
index 270840453c9e..78cd25e81167 100644
--- a/sccomp/source/solver/LpsolveSolver.cxx
+++ b/sccomp/source/solver/LpsolveSolver.cxx
@@ -103,7 +103,7 @@ void SAL_CALL LpsolveSolver::solve()
// collect variables in vector (?)
- auto aVariableCells = comphelper::sequenceToContainer<std::vector<table::CellAddress>>(maVariables);
+ const auto & aVariableCells = maVariables;
size_t nVariables = aVariableCells.size();
size_t nVar = 0;