diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 14:06:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 18:43:34 +0200 |
commit | 3739253b35212f45dd1654286db5e97b70589a57 (patch) | |
tree | e57640c9e9c8f1e8acc7b34a78fcc480c91cbcad /sw/source/ui/vba/vbasections.cxx | |
parent | 043ba6ddf8d90b04acfae8ec836c4b772fb36754 (diff) |
loplugin:moveparam in sw
Change-Id: I4fa524e4abb101ed0ff1b8f97b84582b84aa1d07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123387
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/vba/vbasections.cxx')
-rw-r--r-- | sw/source/ui/vba/vbasections.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/vba/vbasections.cxx b/sw/source/ui/vba/vbasections.cxx index 04a6cd560ab1..0665ebfce809 100644 --- a/sw/source/ui/vba/vbasections.cxx +++ b/sw/source/ui/vba/vbasections.cxx @@ -37,7 +37,7 @@ class SectionEnumeration : public ::cppu::WeakImplHelper< container::XEnumeratio XSectionVec::iterator mIt; public: - explicit SectionEnumeration( const XSectionVec& rVec ) : mxSections( rVec ), mIt( mxSections.begin() ) {} + explicit SectionEnumeration( XSectionVec&& rVec ) : mxSections( std::move(rVec) ), mIt( mxSections.begin() ) {} virtual sal_Bool SAL_CALL hasMoreElements( ) override { return ( mIt != mxSections.end() ); @@ -115,7 +115,7 @@ public: // XEnumerationAccess virtual uno::Reference< container::XEnumeration > SAL_CALL createEnumeration( ) override { - return new SectionEnumeration( mxSections ); + return new SectionEnumeration( std::vector(mxSections) ); } }; |