From 1f9468fc29874eae5100317282ab8b395904406d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 14 Oct 2021 14:57:54 +0200 Subject: use std::vector::insert instead of push_back because it will pre-allocate space and often is optimised to memcpy Change-Id: I03ed7915f2762d3d27e378638052a47a28bbf096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123588 Tested-by: Jenkins Reviewed-by: Noel Grandin --- filter/source/msfilter/escherex.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'filter') diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 450aa4b6f208..fecb2fa45291 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -290,14 +290,9 @@ bool EscherPropertyContainer::GetOpt( sal_uInt16 nPropId, EscherPropSortStruct& return false; } -EscherProperties EscherPropertyContainer::GetOpts() const +const EscherProperties & EscherPropertyContainer::GetOpts() const { - EscherProperties aVector; - - for ( size_t i = 0; i < pSortStruct.size(); ++i ) - aVector.push_back( pSortStruct[ i ] ); - - return aVector; + return pSortStruct; } extern "C" { -- cgit