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>
This commit is contained in:
parent
8fb6f3d894
commit
49fdae5bb4
10 changed files with 37 additions and 30 deletions
|
@ -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 )
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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=";
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <cppuhelper/basemutex.hxx>
|
||||
#include <jvmaccess/virtualmachine.hxx>
|
||||
#include <jvmaccess/unovirtualmachine.hxx>
|
||||
#include <utility>
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -43,9 +44,9 @@ protected:
|
|||
virtual void SAL_CALL disposing() override;
|
||||
|
||||
public:
|
||||
explicit SingletonFactory( ::rtl::Reference< ::jvmaccess::UnoVirtualMachine > const & vm_access )
|
||||
explicit SingletonFactory( ::rtl::Reference< ::jvmaccess::UnoVirtualMachine > vm_access )
|
||||
: t_impl( m_aMutex ),
|
||||
m_vm_access( vm_access )
|
||||
m_vm_access(std::move( vm_access ))
|
||||
{}
|
||||
|
||||
// XSingleComponentFactory impl
|
||||
|
|
|
@ -695,8 +695,8 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
|
|||
JavaVMInitArgs vm_args;
|
||||
|
||||
struct Option {
|
||||
Option(OString const & theOptionString, void * theExtraInfo):
|
||||
optionString(theOptionString), extraInfo(theExtraInfo)
|
||||
Option(OString theOptionString, void * theExtraInfo):
|
||||
optionString(std::move(theOptionString)), extraInfo(theExtraInfo)
|
||||
{}
|
||||
|
||||
OString optionString;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define INCLUDED_JVMFWK_PLUGINS_SUNMAJOR_PLUGINLIB_UTIL_HXX
|
||||
|
||||
#include <rtl/ustring.hxx>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <vendorbase.hxx>
|
||||
|
||||
|
@ -63,7 +64,7 @@ bool makeDriveLetterSame(OUString * fileURL);
|
|||
struct InfoFindSame
|
||||
{
|
||||
OUString sJava;
|
||||
explicit InfoFindSame(const OUString& sJavaHome):sJava(sJavaHome){}
|
||||
explicit InfoFindSame(OUString sJavaHome):sJava(std::move(sJavaHome)){}
|
||||
|
||||
bool operator () (const rtl::Reference<VendorBase> & aVendorInfo)
|
||||
{
|
||||
|
@ -74,7 +75,7 @@ struct InfoFindSame
|
|||
struct SameOrSubDirJREMap
|
||||
{
|
||||
OUString s1;
|
||||
explicit SameOrSubDirJREMap(const OUString& s):s1(s){
|
||||
explicit SameOrSubDirJREMap(OUString s):s1(std::move(s)){
|
||||
}
|
||||
|
||||
bool operator () (const std::pair<const OUString, rtl::Reference<VendorBase> > & s2)
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define INCLUDED_JVMFWK_SOURCE_FRAMEWORK_HXX
|
||||
|
||||
#include <jvmfwk/framework.hxx>
|
||||
#include <utility>
|
||||
|
||||
namespace jfw
|
||||
{
|
||||
|
@ -28,8 +29,8 @@ class FrameworkException : public std::exception
|
|||
{
|
||||
public:
|
||||
|
||||
FrameworkException(javaFrameworkError err, const OString& msg):
|
||||
errorCode(err), message(msg)
|
||||
FrameworkException(javaFrameworkError err, OString msg):
|
||||
errorCode(err), message(std::move(msg))
|
||||
{
|
||||
}
|
||||
javaFrameworkError errorCode;
|
||||
|
|
Loading…
Reference in a new issue