summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
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 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLTableContext.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx
index 6e5e7f068b01..61eb6c400c13 100644
--- a/xmloff/source/chart/SchXMLTableContext.cxx
+++ b/xmloff/source/chart/SchXMLTableContext.cxx
@@ -277,9 +277,9 @@ void SchXMLTableContext::endFastElement(sal_Int32 )
if( mbHasColumnPermutation )
{
SAL_WARN_IF( mbHasRowPermutation, "xmloff.chart", "mbHasColumnPermutation is true" );
- auto aPermutation( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( maColumnPermutation ));
- SAL_WARN_IF( aPermutation.empty(), "xmloff.chart", "aPermutation is NULL");
- if( aPermutation.empty())
+ const auto & aPermutation( maColumnPermutation );
+ SAL_WARN_IF( !aPermutation.hasElements(), "xmloff.chart", "aPermutation is NULL");
+ if( !aPermutation.hasElements())
return;
// permute the values of all rows according to aPermutation
@@ -316,9 +316,9 @@ void SchXMLTableContext::endFastElement(sal_Int32 )
}
else if( mbHasRowPermutation )
{
- auto aPermutation( comphelper::sequenceToContainer<std::vector< sal_Int32 >>( maRowPermutation ));
- SAL_WARN_IF( aPermutation.empty(), "xmloff.chart", "aPermutation is NULL");
- if( aPermutation.empty())
+ const auto & aPermutation( maRowPermutation );
+ SAL_WARN_IF( !aPermutation.hasElements(), "xmloff.chart", "aPermutation is NULL");
+ if( !aPermutation.hasElements())
return;
bool bModified = false;