diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-23 15:02:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-06-24 08:43:55 +0200 |
commit | a2fc883173d7053cefe543620982051ae40c4b03 (patch) | |
tree | dac1b760925c8151dfd8a9cbe3a8735b68ab9f79 /oox | |
parent | 010713e65ccade7b682c219707c8db3d864145c1 (diff) |
use more std::container::insert instead of std::copy
which is both more compact code, and more efficient, since the insert
method can do smarter resizing
Change-Id: I17f226660f87cdf002edccc29b4af8fd59a25f91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96948
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/chartexport.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 6511cfaac48c..e1ff4e7f763c 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -354,8 +354,7 @@ static void lcl_fillCategoriesIntoStringVector( { rOutCategories.clear(); Sequence< OUString > aTextData( xTextualDataSequence->getTextualData()); - ::std::copy( aTextData.begin(), aTextData.end(), - ::std::back_inserter( rOutCategories )); + rOutCategories.insert( rOutCategories.end(), aTextData.begin(), aTextData.end() ); } else { @@ -376,8 +375,7 @@ static ::std::vector< double > lcl_getAllValuesFromSequence( const Reference< ch if( xNumSeq.is()) { Sequence< double > aValues( xNumSeq->getNumericalData()); - ::std::copy( aValues.begin(), aValues.end(), - ::std::back_inserter( aResult )); + aResult.insert( aResult.end(), aValues.begin(), aValues.end() ); } else if( xSeq.is()) { |