summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 10:18:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-21 12:59:41 +0200
commit49fdae5bb4f584d26cea958e554678154bedf379 (patch)
treeb888e7853807edbe531c3055582575e06396c8a1 /io
parent8fb6f3d894093c729e8ee304f8b6fb553a7ceac4 (diff)
clang-tidy modernize-pass-by-value in io..jvmfwk
Change-Id: I6e19d4d03957c35caa79a231927eae04ae630442 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io')
-rw-r--r--io/source/acceptor/acc_pipe.cxx13
-rw-r--r--io/source/acceptor/acc_socket.cxx15
-rw-r--r--io/source/acceptor/acceptor.hxx6
-rw-r--r--io/source/connector/connector.hxx4
-rw-r--r--io/source/connector/ctr_pipe.cxx5
-rw-r--r--io/source/connector/ctr_socket.cxx5
6 files changed, 26 insertions, 22 deletions
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index db43c58db103..c3af874498de 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -26,6 +26,7 @@
#include <osl/diagnose.h>
#include <cppuhelper/implbase.hxx>
#include <rtl/ref.hxx>
+#include <utility>
using namespace ::osl;
using namespace ::cppu;
@@ -43,7 +44,7 @@ namespace io_acceptor
public WeakImplHelper< XConnection >
{
public:
- explicit PipeConnection( const OUString &sConnectionDescription);
+ explicit PipeConnection( OUString sConnectionDescription);
virtual sal_Int32 SAL_CALL read( Sequence< sal_Int8 >& aReadBytes, sal_Int32 nBytesToRead ) override;
virtual void SAL_CALL write( const Sequence< sal_Int8 >& aData ) override;
@@ -58,9 +59,9 @@ namespace io_acceptor
}
- PipeConnection::PipeConnection( const OUString &sConnectionDescription) :
+ PipeConnection::PipeConnection( OUString sConnectionDescription) :
m_nStatus( 0 ),
- m_sDescription( sConnectionDescription )
+ m_sDescription(std::move( sConnectionDescription ))
{
// make it unique
m_sDescription += ",uniqueValue=";
@@ -121,9 +122,9 @@ namespace io_acceptor
/***************
* PipeAcceptor
**************/
- PipeAcceptor::PipeAcceptor( const OUString &sPipeName , const OUString & sConnectionDescription) :
- m_sPipeName( sPipeName ),
- m_sConnectionDescription( sConnectionDescription ),
+ PipeAcceptor::PipeAcceptor( OUString sPipeName , OUString sConnectionDescription) :
+ m_sPipeName(std::move( sPipeName )),
+ m_sConnectionDescription(std::move( sConnectionDescription )),
m_bClosed( false )
{
}
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index d52fdc423bdf..c211acdc3ab5 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -28,6 +28,7 @@
#include <com/sun/star/connection/ConnectionSetupException.hpp>
#include <com/sun/star/io/IOException.hpp>
#include <cppuhelper/implbase.hxx>
+#include <utility>
using namespace ::osl;
using namespace ::cppu;
@@ -49,7 +50,7 @@ namespace io_acceptor {
{
public:
- explicit SocketConnection( const OUString & sConnectionDescription );
+ explicit SocketConnection( OUString sConnectionDescription );
virtual sal_Int32 SAL_CALL read( css::uno::Sequence< sal_Int8 >& aReadBytes,
sal_Int32 nBytesToRead ) override;
@@ -129,9 +130,9 @@ namespace io_acceptor {
}
- SocketConnection::SocketConnection( const OUString &sConnectionDescription) :
+ SocketConnection::SocketConnection( OUString sConnectionDescription) :
m_nStatus( 0 ),
- m_sDescription( sConnectionDescription ),
+ m_sDescription(std::move( sConnectionDescription )),
_started(false),
_closed(false),
_error(false)
@@ -264,12 +265,12 @@ namespace io_acceptor {
_listeners.erase(aListener);
}
- SocketAcceptor::SocketAcceptor( const OUString &sSocketName,
+ SocketAcceptor::SocketAcceptor( OUString sSocketName,
sal_uInt16 nPort,
bool bTcpNoDelay,
- const OUString &sConnectionDescription) :
- m_sSocketName( sSocketName ),
- m_sConnectionDescription( sConnectionDescription ),
+ OUString sConnectionDescription) :
+ m_sSocketName(std::move( sSocketName )),
+ m_sConnectionDescription(std::move( sConnectionDescription )),
m_nPort( nPort ),
m_bTcpNoDelay( bTcpNoDelay ),
m_bClosed( false )
diff --git a/io/source/acceptor/acceptor.hxx b/io/source/acceptor/acceptor.hxx
index 9214a10b7509..9dc3690166cc 100644
--- a/io/source/acceptor/acceptor.hxx
+++ b/io/source/acceptor/acceptor.hxx
@@ -32,7 +32,7 @@ namespace io_acceptor {
class PipeAcceptor
{
public:
- PipeAcceptor( const OUString &sPipeName , const OUString &sConnectionDescription );
+ PipeAcceptor( OUString sPipeName, OUString sConnectionDescription );
void init();
css::uno::Reference < css::connection::XConnection > accept( );
@@ -49,10 +49,10 @@ namespace io_acceptor {
class SocketAcceptor
{
public:
- SocketAcceptor( const OUString & sSocketName ,
+ SocketAcceptor( OUString sSocketName ,
sal_uInt16 nPort,
bool bTcpNoDelay,
- const OUString &sConnectionDescription );
+ OUString sConnectionDescription );
void init();
css::uno::Reference < css::connection::XConnection > accept();
diff --git a/io/source/connector/connector.hxx b/io/source/connector/connector.hxx
index 691fc7a885df..1d70b55ddcc6 100644
--- a/io/source/connector/connector.hxx
+++ b/io/source/connector/connector.hxx
@@ -39,7 +39,7 @@ namespace stoc_connector
{
public:
- explicit PipeConnection( const OUString &sConnectionDescription );
+ explicit PipeConnection( OUString sConnectionDescription );
virtual ~PipeConnection() override;
virtual sal_Int32 SAL_CALL read( css::uno::Sequence< sal_Int8 >& aReadBytes,
@@ -59,7 +59,7 @@ namespace stoc_connector
{
public:
- explicit SocketConnection( const OUString & sConnectionDescription );
+ explicit SocketConnection( OUString sConnectionDescription );
virtual ~SocketConnection() override;
virtual sal_Int32 SAL_CALL read( css::uno::Sequence< sal_Int8 >& aReadBytes,
diff --git a/io/source/connector/ctr_pipe.cxx b/io/source/connector/ctr_pipe.cxx
index 5ee0b70bc970..ba3ca7fb761b 100644
--- a/io/source/connector/ctr_pipe.cxx
+++ b/io/source/connector/ctr_pipe.cxx
@@ -23,6 +23,7 @@
#include "connector.hxx"
#include <osl/pipe.hxx>
+#include <utility>
using namespace ::osl;
using namespace ::com::sun::star::uno;
@@ -32,9 +33,9 @@ using namespace ::com::sun::star::connection;
namespace stoc_connector {
- PipeConnection::PipeConnection( const OUString & sConnectionDescription ) :
+ PipeConnection::PipeConnection( OUString sConnectionDescription ) :
m_nStatus( 0 ),
- m_sDescription( sConnectionDescription )
+ m_sDescription(std::move( sConnectionDescription ))
{
// make it unique
m_sDescription += ",uniqueValue=";
diff --git a/io/source/connector/ctr_socket.cxx b/io/source/connector/ctr_socket.cxx
index dcdeef07ff83..0edb32ffc2d0 100644
--- a/io/source/connector/ctr_socket.cxx
+++ b/io/source/connector/ctr_socket.cxx
@@ -20,6 +20,7 @@
#include "connector.hxx"
#include <com/sun/star/io/IOException.hpp>
+#include <utility>
using namespace ::osl;
using namespace ::com::sun::star::uno;
@@ -80,9 +81,9 @@ namespace stoc_connector {
}
- SocketConnection::SocketConnection( const OUString &sConnectionDescription ) :
+ SocketConnection::SocketConnection( OUString sConnectionDescription ) :
m_nStatus( 0 ),
- m_sDescription( sConnectionDescription ),
+ m_sDescription(std::move( sConnectionDescription )),
_started(false),
_closed(false),
_error(false)