From 1ad26c9fc237e00247f18fcc8ccc778fba88d1fd Mon Sep 17 00:00:00 2001 From: Noel Date: Thu, 11 Feb 2021 16:15:15 +0200 Subject: loplugin:referencecasting add check for new rtl::Reference operator rtl::Reference now has a conversion operator to uno::Reference, so look for places where we can simplify the code and use that. Change-Id: Ic81db50d670bed5e875300577d4bf5f3599cc2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110798 Tested-by: Jenkins Reviewed-by: Noel Grandin --- io/source/acceptor/acc_pipe.cxx | 2 +- io/source/acceptor/acc_socket.cxx | 2 +- io/source/connector/connector.cxx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'io') diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index 0718834e3115..62f90993dca7 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -163,7 +163,7 @@ namespace io_acceptor } else if( osl_Pipe_E_None == status ) { - return pConn.get(); + return pConn; } else { diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx index 57c8a179885b..96d777fd0d8b 100644 --- a/io/source/acceptor/acc_socket.cxx +++ b/io/source/acceptor/acc_socket.cxx @@ -343,7 +343,7 @@ namespace io_acceptor { sizeof( nTcpNoDelay ) , osl_Socket_LevelTcp ); } - return pConn.get(); + return pConn; } void SocketAcceptor::stopAccepting() diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx index 6072afb9dbff..87e60934cfb6 100644 --- a/io/source/connector/connector.cxx +++ b/io/source/connector/connector.cxx @@ -85,7 +85,7 @@ Reference< XConnection > SAL_CALL OConnector::connect( const OUString& sConnecti if( pConn->m_pipe.create( aName.pData, osl_Pipe_OPEN, osl::Security() ) ) { - r.set( pConn.get() ); + r = pConn; } else { @@ -128,7 +128,7 @@ Reference< XConnection > SAL_CALL OConnector::connect( const OUString& sConnecti sizeof( nTcpNoDelay ) , osl_Socket_LevelTcp ); } pConn->completeConnectionString(); - r.set( pConn.get() ); + r = pConn; } else { -- cgit