diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-10 20:41:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-10-11 11:37:04 +0200 |
commit | 66e5317a91475ab5f7c796f023431d6a642fd60e (patch) | |
tree | 8a6d107b695cd6a064276b8da1163b021bc018bd /unoidl/source/unoidl.cxx | |
parent | bbe9bfee56ce395c5fa1c1173e9909925a3a6393 (diff) |
loplugin:moveparam in unoidl
Change-Id: Id3069cad0b118b5593bb7a0faa9d7e33e5bef168
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123353
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unoidl/source/unoidl.cxx')
-rw-r--r-- | unoidl/source/unoidl.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unoidl/source/unoidl.cxx b/unoidl/source/unoidl.cxx index b66a6f45e534..749f9afe4f25 100644 --- a/unoidl/source/unoidl.cxx +++ b/unoidl/source/unoidl.cxx @@ -32,9 +32,9 @@ namespace { class AggregatingModule: public ModuleEntity { public: AggregatingModule( - std::vector< rtl::Reference< Provider > > const & providers, + std::vector< rtl::Reference< Provider > >&& providers, OUString const & name): - providers_(providers), name_(name) + providers_(std::move(providers)), name_(name) {} private: @@ -64,9 +64,9 @@ std::vector< OUString > AggregatingModule::getMemberNames() const { class AggregatingCursor: public MapCursor { public: AggregatingCursor( - std::vector< rtl::Reference< Provider > > const & providers, + std::vector< rtl::Reference< Provider > >&& providers, OUString const & name): - providers_(providers), name_(name), iterator_(providers_.begin()) + providers_(std::move(providers)), name_(name), iterator_(providers_.begin()) { findCursor(); } private: @@ -94,7 +94,7 @@ rtl::Reference< Entity > AggregatingCursor::getNext(OUString * name) { } return ent->getSort() == Entity::SORT_MODULE ? new AggregatingModule( - providers_, (name_.isEmpty() ? name_ : name_ + ".") + n) + std::vector(providers_), (name_.isEmpty() ? name_ : name_ + ".") + n) : ent; } } else { @@ -120,7 +120,7 @@ void AggregatingCursor::findCursor() { } rtl::Reference< MapCursor > AggregatingModule::createCursor() const { - return new AggregatingCursor(providers_, name_); + return new AggregatingCursor(std::vector(providers_), name_); } } @@ -189,7 +189,7 @@ rtl::Reference< Entity > Manager::findEntity(OUString const & name) const { rtl::Reference< MapCursor > Manager::createCursor(OUString const & name) const { - return new AggregatingCursor(providers_, name); + return new AggregatingCursor(std::vector(providers_), name); } Manager::~Manager() noexcept {} |