diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-14 10:12:44 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-14 15:38:12 +0200 |
commit | 8c15ccc2671d93b06c00730d03b441f3466984d4 (patch) | |
tree | 55e7a129b2a431555009e1f4446dbbc3a0c5ce20 /sfx2/source/control | |
parent | a5d3238104a46f933584cc2a896b00bae82bf4ec (diff) |
clang-tidy modernize-pass-by-value in sfx2
Change-Id: I7984f0b52809091511dc01005fdbfeafd521b4bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137048
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/minfitem.cxx | 17 | ||||
-rw-r--r-- | sfx2/source/control/statcach.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 5 |
3 files changed, 16 insertions, 13 deletions
diff --git a/sfx2/source/control/minfitem.cxx b/sfx2/source/control/minfitem.cxx index 8d8f0a80ac30..709ad6293c3c 100644 --- a/sfx2/source/control/minfitem.cxx +++ b/sfx2/source/control/minfitem.cxx @@ -19,6 +19,7 @@ #include <sfx2/minfitem.hxx> #include <sal/log.hxx> +#include <utility> #include <config_features.h> #if HAVE_FEATURE_SCRIPTING @@ -29,16 +30,16 @@ SfxPoolItem* SfxMacroInfoItem::CreateDefault() { SAL_WARN( "sfx", "No SfxMacroIn SfxMacroInfoItem::SfxMacroInfoItem( sal_uInt16 nWhichId, // Slot-ID const BasicManager* pMgr, - const OUString &rLibName, - const OUString &rModuleName, - const OUString &rMethodName, - const OUString &rComment) : + OUString _aLibName, + OUString _aModuleName, + OUString _aMethodName, + OUString _aComment) : SfxPoolItem(nWhichId), pBasicManager(pMgr), - aLibName(rLibName), - aModuleName(rModuleName), - aMethodName(rMethodName), - aCommentText(rComment) + aLibName(std::move(_aLibName)), + aModuleName(std::move(_aModuleName)), + aMethodName(std::move(_aMethodName)), + aCommentText(std::move(_aComment)) { } diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index ef1eaf1a1508..8e0dd7810f5f 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -41,15 +41,16 @@ #include <unoctitm.hxx> #include <sfx2/msgpool.hxx> #include <sfx2/viewfrm.hxx> +#include <utility> #include <tools/diagnose_ex.h> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::util; -BindDispatch_Impl::BindDispatch_Impl( const css::uno::Reference< css::frame::XDispatch > & rDisp, const css::util::URL& rURL, SfxStateCache *pStateCache, const SfxSlot* pS ) - : xDisp( rDisp ) - , aURL( rURL ) +BindDispatch_Impl::BindDispatch_Impl( css::uno::Reference< css::frame::XDispatch > _xDisp, css::util::URL _aURL, SfxStateCache *pStateCache, const SfxSlot* pS ) + : xDisp(std::move( _xDisp )) + , aURL(std::move( _aURL )) , pCache( pStateCache ) , pSlot( pS ) { diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 4ee282227107..01eee96f5ddf 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -42,6 +42,7 @@ #include <com/sun/star/frame/status/Visibility.hpp> #include <comphelper/processfactory.hxx> #include <uno/current_context.hxx> +#include <utility> #include <vcl/svapp.hxx> #include <vcl/uitest/logger.hxx> #include <boost/property_tree/json_parser.hpp> @@ -338,8 +339,8 @@ SfxDispatchController_Impl::SfxDispatchController_Impl( SfxBindings* pBind, SfxDispatcher* pDispat, const SfxSlot* pSlot, - const css::util::URL& rURL ) - : aDispatchURL( rURL ) + css::util::URL aURL ) + : aDispatchURL(std::move( aURL )) , pDispatcher( pDispat ) , pBindings( pBind ) , pLastState( nullptr ) |