summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-05-31 10:23:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-31 15:11:27 +0200
commit5ecdedbf81af5516ff7d2195383dc9d6389fb0d0 (patch)
tree5b07d41d683abb65354bf4ced261edfb86ef3174 /include
parentaf44198d80edce92bdbb82dfd6f218eeb6163484 (diff)
clang-tidy modernize-pass-by-value in basic
Change-Id: I9034ab95a4ccb58e36e77d911dd33cc50857c03a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135176 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/basic/basmgr.hxx9
-rw-r--r--include/basic/sbx.hxx7
2 files changed, 9 insertions, 7 deletions
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 94fea1a0bf77..166b62489be1 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -19,6 +19,7 @@
#ifndef INCLUDED_BASIC_BASMGR_HXX
#define INCLUDED_BASIC_BASMGR_HXX
+#include <utility>
#include <vcl/errcode.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <basic/sbstar.hxx>
@@ -90,12 +91,12 @@ struct LibraryContainerInfo
LibraryContainerInfo
(
- css::uno::Reference< css::script::XPersistentLibraryContainer > const & xScriptCont,
- css::uno::Reference< css::script::XPersistentLibraryContainer > const & xDialogCont,
+ css::uno::Reference< css::script::XPersistentLibraryContainer > xScriptCont,
+ css::uno::Reference< css::script::XPersistentLibraryContainer > xDialogCont,
OldBasicPassword* pOldBasicPassword
)
- : mxScriptCont( xScriptCont )
- , mxDialogCont( xDialogCont )
+ : mxScriptCont(std::move( xScriptCont ))
+ , mxDialogCont(std::move( xDialogCont ))
, mpOldBasicPassword( pOldBasicPassword )
{}
};
diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 999ba3c3127d..7997f53ef422 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -28,6 +28,7 @@
#include <basic/sbxobj.hxx>
#include <basic/basicdllapi.h>
+#include <utility>
#include <vector>
#include <memory>
@@ -42,8 +43,8 @@ struct SbxParamInfo
SbxDataType eType; // Data type
SbxFlagBits nFlags; // Flag-Bits
sal_uInt32 nUserData; // IDs etc.
- SbxParamInfo( const OUString& s, SbxDataType t, SbxFlagBits n )
- : aName( s ), eType( t ), nFlags( n ), nUserData( 0 ) {}
+ SbxParamInfo( OUString s, SbxDataType t, SbxFlagBits n )
+ : aName(std::move( s )), eType( t ), nFlags( n ), nUserData( 0 ) {}
};
typedef std::vector<std::unique_ptr<SbxParamInfo>> SbxParams;
@@ -66,7 +67,7 @@ class UNLESS_MERGELIBS(BASIC_DLLPUBLIC) SbxInfo final : public SvRefBase
virtual ~SbxInfo() override;
public:
SbxInfo();
- SbxInfo( const OUString&, sal_uInt32 );
+ SbxInfo( OUString , sal_uInt32 );
void AddParam( const OUString&, SbxDataType, SbxFlagBits=SbxFlagBits::Read );
const SbxParamInfo* GetParam( sal_uInt16 n ) const; // index starts with 1!