summaryrefslogtreecommitdiff
path: root/sax
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 /sax
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 'sax')
-rw-r--r--sax/source/tools/fastserializer.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index f4763dfa7c5d..b4b9de8fb9c6 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -784,8 +784,8 @@ namespace sax_fastparser {
void FastSaxSerializer::ForSort::setCurrentElement( sal_Int32 nElement )
{
- vector< sal_Int32 > aOrder( comphelper::sequenceToContainer<vector<sal_Int32> >(maOrder) );
- if( std::find( aOrder.begin(), aOrder.end(), nElement ) != aOrder.end() )
+ const auto & rOrder = maOrder;
+ if( std::find( rOrder.begin(), rOrder.end(), nElement ) != rOrder.end() )
{
mnCurrentElement = nElement;
if ( maData.find( nElement ) == maData.end() )