diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-02 10:44:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-02 12:12:15 +0200 |
commit | c60ad041e8f48759062d652ca20216c424768fa4 (patch) | |
tree | 73f2839e672f91b4262d79fe88bc0b8af1c44ff4 /framework/inc/menuconfiguration.hxx | |
parent | 826b0fc9aacbe58c998aec8ebba3401c0a68a015 (diff) |
clang-tidy modernize-pass-by-value in framework
Change-Id: I024653154c51389bb27f3e94b422ff7fc1c9b46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135296
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/inc/menuconfiguration.hxx')
-rw-r--r-- | framework/inc/menuconfiguration.hxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/framework/inc/menuconfiguration.hxx b/framework/inc/menuconfiguration.hxx index a076de21b504..9389ed3e3986 100644 --- a/framework/inc/menuconfiguration.hxx +++ b/framework/inc/menuconfiguration.hxx @@ -20,6 +20,7 @@ #pragma once #include <cppuhelper/weakref.hxx> +#include <utility> namespace com::sun::star::container { class XIndexAccess; } namespace com::sun::star::frame { class XDispatchProvider; } @@ -35,16 +36,16 @@ struct MenuAttributes private: oslInterlockedCount refCount; - MenuAttributes(const OUString& rFrame, const OUString& rImageIdStr) + MenuAttributes(OUString sFrame, OUString sImageIdStr) : refCount(0) - , aTargetFrame(rFrame) - , aImageId(rImageIdStr) + , aTargetFrame(std::move(sFrame)) + , aImageId(std::move(sImageIdStr)) { } - MenuAttributes(const css::uno::WeakReference<css::frame::XDispatchProvider>& rDispatchProvider) + MenuAttributes(css::uno::WeakReference<css::frame::XDispatchProvider> _xDispatchProvider) : refCount(0) - , xDispatchProvider(rDispatchProvider) + , xDispatchProvider(std::move(_xDispatchProvider)) { } @@ -76,7 +77,7 @@ class MenuConfiguration final public: MenuConfiguration( // use const when giving a UNO reference by reference - const css::uno::Reference< css::uno::XComponentContext >& rxContext ); + css::uno::Reference< css::uno::XComponentContext > rxContext ); ~MenuConfiguration(); |