comphelper/source/container/enumhelper.cxx | 2 +- include/comphelper/enumhelper.hxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
New commits: commit ed38659127ac801666de1bc423855d2b666f7150 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Thu Nov 10 19:01:49 2022 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Fri Nov 11 12:30:03 2022 +0100 Drop counterproductive top-level const ...that was apparently left by accident by 24c709655e5c1ca51c6c6da7ef0cb733354f6d20 "clang-tidy modernize-pass-by-value in comphelper", thwarting the use of std::move here. And clean up the declarations in the include file, too. (I came across this code with an upcoming loplugin:constmove that flags suspicious uses of std::move involving const-qualified types.) Change-Id: I8178ad09bc4e7d4f57c5dfd9b0e2103e6d4fa72a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142566 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/comphelper/source/container/enumhelper.cxx b/comphelper/source/container/enumhelper.cxx index bc9ae43e44ad..66ba15198232 100644 --- a/comphelper/source/container/enumhelper.cxx +++ b/comphelper/source/container/enumhelper.cxx @@ -36,7 +36,7 @@ OEnumerationByName::OEnumerationByName(css::uno::Reference<css::container::XName } -OEnumerationByName::OEnumerationByName(const css::uno::Reference<css::container::XNameAccess> _xAccess, +OEnumerationByName::OEnumerationByName(css::uno::Reference<css::container::XNameAccess> _xAccess, std::vector<OUString> _aNames ) :m_aNames(std::move(_aNames)) ,m_xAccess(std::move(_xAccess)) diff --git a/include/comphelper/enumhelper.hxx b/include/comphelper/enumhelper.hxx index fb26de48971d..91e8af5b8f9a 100644 --- a/include/comphelper/enumhelper.hxx +++ b/include/comphelper/enumhelper.hxx @@ -48,8 +48,8 @@ class COMPHELPER_DLLPUBLIC OEnumerationByName final : std::mutex m_aLock; public: - OEnumerationByName(const css::uno::Reference< css::container::XNameAccess > _xAccess); - OEnumerationByName(const css::uno::Reference< css::container::XNameAccess > _xAccess, + OEnumerationByName(css::uno::Reference< css::container::XNameAccess > _xAccess); + OEnumerationByName(css::uno::Reference< css::container::XNameAccess > _xAccess, std::vector<OUString> _aNames ); virtual ~OEnumerationByName() override;