diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-21 13:09:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-21 17:29:53 +0200 |
commit | 80fab1529a5680fcad4075e4363924cfb2f7213a (patch) | |
tree | 60147560144b42893c837b591c72ff2bf132f89b /bridges/source | |
parent | 685eff8c9e6e6097b6f9e365fd6554e10adef063 (diff) |
clang-tidy modernize-pass-by-value in bridges
Change-Id: I6c52316e46117aacb22a2adcb75841aed834041f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134705
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'bridges/source')
-rw-r--r-- | bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx | 5 | ||||
-rw-r--r-- | bridges/source/cpp_uno/shared/unointerfaceproxy.cxx | 5 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_base.h | 5 | ||||
-rw-r--r-- | bridges/source/jni_uno/jni_uno2java.cxx | 7 | ||||
-rw-r--r-- | bridges/source/jni_uno/nativethreadpool.cxx | 5 |
5 files changed, 16 insertions, 11 deletions
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx index e4ee7800a385..dad1ad8f7ac6 100644 --- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx +++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx @@ -20,6 +20,7 @@ #include <cppinterfaceproxy.hxx> #include <bridge.hxx> +#include <utility> #include <vtablefactory.hxx> #include <com/sun/star/uno/XInterface.hpp> @@ -102,12 +103,12 @@ void CppInterfaceProxy::releaseProxy() CppInterfaceProxy::CppInterfaceProxy( bridges::cpp_uno::shared::Bridge * pBridge_, uno_Interface * pUnoI_, - typelib_InterfaceTypeDescription * pTypeDescr_, OUString const & rOId_) + typelib_InterfaceTypeDescription * pTypeDescr_, OUString aOId_) : nRef( 1 ) , pBridge( pBridge_ ) , pUnoI( pUnoI_ ) , pTypeDescr( pTypeDescr_ ) - , oid( rOId_ ) + , oid(std::move( aOId_ )) { pBridge->acquire(); ::typelib_typedescription_acquire( &pTypeDescr->aBase ); diff --git a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx index 91578e9999d1..3c03c1cffc0f 100644 --- a/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx +++ b/bridges/source/cpp_uno/shared/unointerfaceproxy.cxx @@ -22,6 +22,7 @@ #include <bridge.hxx> #include <com/sun/star/uno/XInterface.hpp> +#include <utility> #include <typelib/typedescription.h> #include <uno/dispatcher.h> @@ -93,12 +94,12 @@ UnoInterfaceProxy * UnoInterfaceProxy::create( UnoInterfaceProxy::UnoInterfaceProxy( bridges::cpp_uno::shared::Bridge * pBridge_, com::sun::star::uno::XInterface * pCppI_, - typelib_InterfaceTypeDescription * pTypeDescr_, OUString const & rOId_) + typelib_InterfaceTypeDescription * pTypeDescr_, OUString aOId_) : nRef( 1 ) , pBridge( pBridge_ ) , pCppI( pCppI_ ) , pTypeDescr( pTypeDescr_ ) - , oid( rOId_ ) + , oid(std::move( aOId_ )) { pBridge->acquire(); ::typelib_typedescription_acquire(&pTypeDescr->aBase); diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h index 696ddd365533..0d02261adb2a 100644 --- a/bridges/source/jni_uno/jni_base.h +++ b/bridges/source/jni_uno/jni_base.h @@ -31,6 +31,7 @@ #include <rtl/alloc.h> #include <rtl/ustring.hxx> #include <sal/log.hxx> +#include <utility> #include <uno/environment.h> #include <typelib/typedescription.h> @@ -45,8 +46,8 @@ struct BridgeRuntimeError { OUString m_message; - explicit BridgeRuntimeError( OUString const & message ) - : m_message( message ) + explicit BridgeRuntimeError( OUString message ) + : m_message(std::move( message )) {} }; diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx index b8b69789a2ce..8fd38ec31b15 100644 --- a/bridges/source/jni_uno/jni_uno2java.cxx +++ b/bridges/source/jni_uno/jni_uno2java.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <rtl/ustrbuf.hxx> +#include <utility> #include "jni_bridge.h" #include "jniunoenvironmentdata.hxx" @@ -401,7 +402,7 @@ struct UNO_proxy : public uno_Interface // ctor inline UNO_proxy( JNI_context const & jni, Bridge const * bridge, - jobject javaI, jstring jo_oid, OUString const & oid, + jobject javaI, jstring jo_oid, OUString oid, JNI_interface_type_info const * info ); }; @@ -409,10 +410,10 @@ struct UNO_proxy : public uno_Interface inline UNO_proxy::UNO_proxy( JNI_context const & jni, Bridge const * bridge, - jobject javaI, jstring jo_oid, OUString const & oid, + jobject javaI, jstring jo_oid, OUString oid, JNI_interface_type_info const * info ) : m_ref( 1 ), - m_oid( oid ), + m_oid(std::move( oid )), m_type_info( info ) { JNI_info const * jni_info = bridge->getJniInfo(); diff --git a/bridges/source/jni_uno/nativethreadpool.cxx b/bridges/source/jni_uno/nativethreadpool.cxx index 4fe4a0a2fb8d..1d14c47bb0ad 100644 --- a/bridges/source/jni_uno/nativethreadpool.cxx +++ b/bridges/source/jni_uno/nativethreadpool.cxx @@ -29,6 +29,7 @@ #include <jni.h> #include <new> +#include <utility> /* The native implementation part of * jurt/com/sun/star/lib/uno/environments/remote/NativeThreadPool.java. @@ -37,9 +38,9 @@ namespace { struct Pool { - Pool(rtl::Reference< jvmaccess::VirtualMachine > const & theVirtualMachine, + Pool(rtl::Reference< jvmaccess::VirtualMachine > theVirtualMachine, jmethodID theExecute, uno_ThreadPool thePool): - virtualMachine(theVirtualMachine), execute(theExecute), pool(thePool) {} + virtualMachine(std::move(theVirtualMachine)), execute(theExecute), pool(thePool) {} rtl::Reference< jvmaccess::VirtualMachine > virtualMachine; jmethodID execute; |