diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 13:52:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 16:15:30 +0200 |
commit | 7b86c11194dcb8375de38865ec1bf54ee59bffa2 (patch) | |
tree | d691a3523071d6fc0eadb72a0d07b05594dc24f6 /cppuhelper/source | |
parent | 126510981b3a71bf0e73551938c483f14281d3c4 (diff) |
loplugin:moveparam in cppuhelper
Change-Id: Idb6b4794e542791b5cf38b611c5d70a34fbe23b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123382
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cppuhelper/source')
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 6 | ||||
-rw-r--r-- | cppuhelper/source/typemanager.cxx | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx index 009fe137d550..121ad088dc50 100644 --- a/cppuhelper/source/servicemanager.cxx +++ b/cppuhelper/source/servicemanager.cxx @@ -451,8 +451,8 @@ class ContentEnumeration: public cppu::WeakImplHelper< css::container::XEnumeration > { public: - explicit ContentEnumeration(std::vector< css::uno::Any > const & factories): - factories_(factories), iterator_(factories_.begin()) {} + explicit ContentEnumeration(std::vector< css::uno::Any >&& factories): + factories_(std::move(factories)), iterator_(factories_.begin()) {} ContentEnumeration(const ContentEnumeration&) = delete; const ContentEnumeration& operator=(const ContentEnumeration&) = delete; @@ -1193,7 +1193,7 @@ cppuhelper::ServiceManager::createContentEnumeration( factories.push_back(css::uno::Any(impl->factory2)); } } - return new ContentEnumeration(factories); + return new ContentEnumeration(std::move(factories)); } css::uno::Reference< css::beans::XPropertySetInfo > diff --git a/cppuhelper/source/typemanager.cxx b/cppuhelper/source/typemanager.cxx index 12c25ddc92bc..82aad46483fc 100644 --- a/cppuhelper/source/typemanager.cxx +++ b/cppuhelper/source/typemanager.cxx @@ -444,12 +444,12 @@ public: OUString const & name, rtl::Reference< unoidl::PolymorphicStructTypeTemplateEntity > const & entity, - std::vector< OUString > const & arguments): - manager_(manager), name_(name), entity_(entity), arguments_(arguments) + std::vector< OUString >&& arguments): + manager_(manager), name_(name), entity_(entity), arguments_(std::move(arguments)) { assert(manager.is()); assert(entity.is()); - assert(arguments.size() == entity->getTypeParameters().size()); + assert(arguments_.size() == entity->getTypeParameters().size()); } private: @@ -2121,7 +2121,7 @@ css::uno::Any cppuhelper::TypeManager::getInstantiatedStruct( return css::uno::makeAny< css::uno::Reference< css::reflection::XTypeDescription > >( new InstantiatedPolymorphicStructTypeDescription( - this, name, ent2, args)); + this, name, ent2, std::move(args))); } css::uno::Any cppuhelper::TypeManager::getInterfaceMember( |