diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-01 09:09:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-01 13:05:05 +0200 |
commit | b4b4c129e9f00189978cd7b71fd74d0dca4c9ebc (patch) | |
tree | 1afab2d8c7eee21866030fd498faa53af6f9be66 /ucb/source/ucp/cmis | |
parent | 915f3959fe6b3e756b9797a9222b95d9b8c3d293 (diff) |
clang-tidy modernize-pass-by-value in ucb
Change-Id: I641d05e360c3208845a2fa6721ac8ba1ad0f3309
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137667
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb/source/ucp/cmis')
-rw-r--r-- | ucb/source/ucp/cmis/auth_provider.hxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/certvalidation_handler.hxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_content.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_datasupplier.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/std_inputstream.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/std_inputstream.hxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/std_outputstream.cxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/std_outputstream.hxx | 2 |
9 files changed, 20 insertions, 16 deletions
diff --git a/ucb/source/ucp/cmis/auth_provider.hxx b/ucb/source/ucp/cmis/auth_provider.hxx index 9092f3c6bd25..c350617e226c 100644 --- a/ucb/source/ucp/cmis/auth_provider.hxx +++ b/ucb/source/ucp/cmis/auth_provider.hxx @@ -31,10 +31,10 @@ namespace cmis OUString m_sBindingUrl; public: - AuthProvider ( const css::uno::Reference< css::ucb::XCommandEnvironment>& xEnv, - const OUString& sUrl, - const OUString& sBindingUrl ): - m_xEnv( xEnv ), m_sUrl( sUrl ), m_sBindingUrl( sBindingUrl ) { } + AuthProvider ( css::uno::Reference< css::ucb::XCommandEnvironment> xEnv, + OUString sUrl, + OUString sBindingUrl ): + m_xEnv( std::move(xEnv) ), m_sUrl( std::move(sUrl) ), m_sBindingUrl( std::move(sBindingUrl) ) { } bool authenticationQuery( std::string& username, std::string& password ) override; diff --git a/ucb/source/ucp/cmis/certvalidation_handler.hxx b/ucb/source/ucp/cmis/certvalidation_handler.hxx index 110bf78ca5a2..ae46c8397f3c 100644 --- a/ucb/source/ucp/cmis/certvalidation_handler.hxx +++ b/ucb/source/ucp/cmis/certvalidation_handler.hxx @@ -22,6 +22,7 @@ #endif #include <com/sun/star/ucb/XCommandEnvironment.hpp> +#include <utility> namespace cmis { @@ -35,8 +36,8 @@ namespace cmis CertValidationHandler ( const css::uno::Reference< css::ucb::XCommandEnvironment>& xEnv, const css::uno::Reference< css::uno::XComponentContext>& xContext, - const OUString& sHostname ): - m_xEnv( xEnv ), m_xContext( xContext ), m_sHostname( sHostname ) { } + OUString sHostname ): + m_xEnv( xEnv ), m_xContext( xContext ), m_sHostname(std::move( sHostname )) { } bool validateCertificate( std::vector< std::string > certificates ) override; }; diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index e51a452fb7e3..0bd38ea31f65 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -56,6 +56,7 @@ #include <ucbhelper/proxydecider.hxx> #include <ucbhelper/macros.hxx> #include <sax/tools/converter.hxx> +#include <utility> #include "auth_provider.hxx" #include "certvalidation_handler.hxx" @@ -261,11 +262,11 @@ namespace cmis { Content::Content( const uno::Reference< uno::XComponentContext >& rxContext, ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier, - libcmis::ObjectPtr const & pObject ) + libcmis::ObjectPtr pObject ) : ContentImplHelper( rxContext, pProvider, Identifier ), m_pProvider( pProvider ), m_pSession( nullptr ), - m_pObject( pObject ), + m_pObject(std::move( pObject )), m_sURL( Identifier->getContentIdentifier( ) ), m_aURL( Identifier->getContentIdentifier( ) ), m_bTransient( false ), diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx index 23546ce14a3e..4d878133aa0a 100644 --- a/ucb/source/ucp/cmis/cmis_content.hxx +++ b/ucb/source/ucp/cmis/cmis_content.hxx @@ -139,7 +139,7 @@ public: Content( const css::uno::Reference< css::uno::XComponentContext >& rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier, - libcmis::ObjectPtr const & pObject = libcmis::ObjectPtr( ) ); + libcmis::ObjectPtr pObject = libcmis::ObjectPtr( ) ); /// @throws css::ucb::ContentCreationException Content( const css::uno::Reference< css::uno::XComponentContext >& rxContext, diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.hxx b/ucb/source/ucp/cmis/cmis_datasupplier.hxx index f11a9139707e..35d5429ec612 100644 --- a/ucb/source/ucp/cmis/cmis_datasupplier.hxx +++ b/ucb/source/ucp/cmis/cmis_datasupplier.hxx @@ -25,7 +25,7 @@ namespace cmis css::uno::Reference< css::ucb::XContent > xContent; css::uno::Reference< css::sdbc::XRow > xRow; - explicit ResultListEntry( css::uno::Reference< css::ucb::XContent > const & xCnt ) : xContent( xCnt ) + explicit ResultListEntry( css::uno::Reference< css::ucb::XContent > xCnt ) : xContent( std::move(xCnt) ) { } }; diff --git a/ucb/source/ucp/cmis/std_inputstream.cxx b/ucb/source/ucp/cmis/std_inputstream.cxx index ed7e5d19b7a8..e73a3160b979 100644 --- a/ucb/source/ucp/cmis/std_inputstream.cxx +++ b/ucb/source/ucp/cmis/std_inputstream.cxx @@ -13,6 +13,7 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <sal/log.hxx> #include <cppuhelper/queryinterface.hxx> +#include <utility> #include "std_inputstream.hxx" @@ -20,8 +21,8 @@ using namespace com::sun::star; namespace cmis { - StdInputStream::StdInputStream( boost::shared_ptr< std::istream > const & pStream ) : - m_pStream( pStream ), + StdInputStream::StdInputStream( boost::shared_ptr< std::istream > pStream ) : + m_pStream(std::move( pStream )), m_nLength( 0 ) { if (m_pStream) diff --git a/ucb/source/ucp/cmis/std_inputstream.hxx b/ucb/source/ucp/cmis/std_inputstream.hxx index 7cfcf7a88901..1904d7ebe937 100644 --- a/ucb/source/ucp/cmis/std_inputstream.hxx +++ b/ucb/source/ucp/cmis/std_inputstream.hxx @@ -29,7 +29,7 @@ namespace cmis { public: - StdInputStream( boost::shared_ptr< std::istream > const & pStream ); + StdInputStream( boost::shared_ptr< std::istream > pStream ); virtual ~StdInputStream() override; diff --git a/ucb/source/ucp/cmis/std_outputstream.cxx b/ucb/source/ucp/cmis/std_outputstream.cxx index 306dc4c44be3..ead2147b939f 100644 --- a/ucb/source/ucp/cmis/std_outputstream.cxx +++ b/ucb/source/ucp/cmis/std_outputstream.cxx @@ -12,6 +12,7 @@ #include <com/sun/star/io/IOException.hpp> #include <sal/log.hxx> #include <cppuhelper/queryinterface.hxx> +#include <utility> #include "std_outputstream.hxx" @@ -19,8 +20,8 @@ using namespace com::sun::star; namespace cmis { - StdOutputStream::StdOutputStream( boost::shared_ptr< std::ostream > const & pStream ) : - m_pStream( pStream ) + StdOutputStream::StdOutputStream( boost::shared_ptr< std::ostream > pStream ) : + m_pStream(std::move( pStream )) { } diff --git a/ucb/source/ucp/cmis/std_outputstream.hxx b/ucb/source/ucp/cmis/std_outputstream.hxx index 74eb4681e912..3201e14efe17 100644 --- a/ucb/source/ucp/cmis/std_outputstream.hxx +++ b/ucb/source/ucp/cmis/std_outputstream.hxx @@ -27,7 +27,7 @@ namespace cmis { public: - StdOutputStream( boost::shared_ptr< std::ostream > const & pStream ); + StdOutputStream( boost::shared_ptr< std::ostream > pStream ); virtual ~StdOutputStream( ) override; |