Kaydet (Commit) 22980bea authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:nullptr (automatic rewrite)

Change-Id: I04ceb5b1514a1d0bf123a1cded5e1aac3e8dde2f
üst a96b564a
...@@ -115,10 +115,10 @@ public: ...@@ -115,10 +115,10 @@ public:
OTextInputStream::OTextInputStream() OTextInputStream::OTextInputStream()
: mbEncodingInitialized(false) : mbEncodingInitialized(false)
, mConvText2Unicode(NULL) , mConvText2Unicode(nullptr)
, mContextText2Unicode(NULL) , mContextText2Unicode(nullptr)
, mSeqSource(READ_BYTE_COUNT) , mSeqSource(READ_BYTE_COUNT)
, mpBuffer(NULL) , mpBuffer(nullptr)
, mnBufferSize(0) , mnBufferSize(0)
, mnCharsInBuffer(0) , mnCharsInBuffer(0)
, mbReachedEOF(false) , mbReachedEOF(false)
......
...@@ -95,8 +95,8 @@ public: ...@@ -95,8 +95,8 @@ public:
OTextOutputStream::OTextOutputStream() OTextOutputStream::OTextOutputStream()
: mbEncodingInitialized(false) : mbEncodingInitialized(false)
, mConvUnicode2Text(NULL) , mConvUnicode2Text(nullptr)
, mContextUnicode2Text(NULL) , mContextUnicode2Text(nullptr)
{ {
} }
......
...@@ -79,8 +79,8 @@ namespace io_acceptor ...@@ -79,8 +79,8 @@ namespace io_acceptor
OAcceptor::OAcceptor( const Reference< XComponentContext > & xCtx ) OAcceptor::OAcceptor( const Reference< XComponentContext > & xCtx )
: m_pPipe( 0 ) : m_pPipe( nullptr )
, m_pSocket( 0 ) , m_pSocket( nullptr )
, m_bInAccept( false ) , m_bInAccept( false )
, _xSMgr( xCtx->getServiceManager() ) , _xSMgr( xCtx->getServiceManager() )
, _xCtx( xCtx ) , _xCtx( xCtx )
...@@ -163,7 +163,7 @@ namespace io_acceptor ...@@ -163,7 +163,7 @@ namespace io_acceptor
{ {
MutexGuard g( m_mutex ); MutexGuard g( m_mutex );
delete m_pPipe; delete m_pPipe;
m_pPipe = 0; m_pPipe = nullptr;
} }
throw; throw;
} }
...@@ -197,7 +197,7 @@ namespace io_acceptor ...@@ -197,7 +197,7 @@ namespace io_acceptor
{ {
MutexGuard g( m_mutex ); MutexGuard g( m_mutex );
delete m_pSocket; delete m_pSocket;
m_pSocket = 0; m_pSocket = nullptr;
} }
throw; throw;
} }
......
...@@ -35,64 +35,64 @@ static const struct ImplementationEntry g_entries[] = ...@@ -35,64 +35,64 @@ static const struct ImplementationEntry g_entries[] =
{ {
io_acceptor::acceptor_CreateInstance, io_acceptor::acceptor_getImplementationName , io_acceptor::acceptor_CreateInstance, io_acceptor::acceptor_getImplementationName ,
io_acceptor::acceptor_getSupportedServiceNames, createSingleComponentFactory , io_acceptor::acceptor_getSupportedServiceNames, createSingleComponentFactory ,
0, 0 nullptr, 0
}, },
{ {
stoc_connector::connector_CreateInstance, stoc_connector::connector_getImplementationName , stoc_connector::connector_CreateInstance, stoc_connector::connector_getImplementationName ,
stoc_connector::connector_getSupportedServiceNames, createSingleComponentFactory , stoc_connector::connector_getSupportedServiceNames, createSingleComponentFactory ,
0, 0 nullptr, 0
}, },
{ {
io_stm::OPipeImpl_CreateInstance, io_stm::OPipeImpl_getImplementationName , io_stm::OPipeImpl_CreateInstance, io_stm::OPipeImpl_getImplementationName ,
io_stm::OPipeImpl_getSupportedServiceNames, createSingleComponentFactory , io_stm::OPipeImpl_getSupportedServiceNames, createSingleComponentFactory ,
0, 0 nullptr, 0
}, },
{ {
io_stm::OPumpImpl_CreateInstance, io_stm::OPumpImpl_getImplementationName , io_stm::OPumpImpl_CreateInstance, io_stm::OPumpImpl_getImplementationName ,
io_stm::OPumpImpl_getSupportedServiceNames, createSingleComponentFactory , io_stm::OPumpImpl_getSupportedServiceNames, createSingleComponentFactory ,
0, 0 nullptr, 0
}, },
{ {
io_stm::ODataInputStream_CreateInstance, io_stm::ODataInputStream_getImplementationName, io_stm::ODataInputStream_CreateInstance, io_stm::ODataInputStream_getImplementationName,
io_stm::ODataInputStream_getSupportedServiceNames, createSingleComponentFactory, io_stm::ODataInputStream_getSupportedServiceNames, createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
io_stm::ODataOutputStream_CreateInstance, io_stm::ODataOutputStream_getImplementationName, io_stm::ODataOutputStream_CreateInstance, io_stm::ODataOutputStream_getImplementationName,
io_stm::ODataOutputStream_getSupportedServiceNames, createSingleComponentFactory, io_stm::ODataOutputStream_getSupportedServiceNames, createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
io_stm::OObjectInputStream_CreateInstance, io_stm::OObjectInputStream_getImplementationName, io_stm::OObjectInputStream_CreateInstance, io_stm::OObjectInputStream_getImplementationName,
io_stm::OObjectInputStream_getSupportedServiceNames, createSingleComponentFactory, io_stm::OObjectInputStream_getSupportedServiceNames, createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
io_stm::OObjectOutputStream_CreateInstance, io_stm::OObjectOutputStream_getImplementationName, io_stm::OObjectOutputStream_CreateInstance, io_stm::OObjectOutputStream_getImplementationName,
io_stm::OObjectOutputStream_getSupportedServiceNames, createSingleComponentFactory, io_stm::OObjectOutputStream_getSupportedServiceNames, createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
io_stm::OMarkableInputStream_CreateInstance, io_stm::OMarkableInputStream_getImplementationName, io_stm::OMarkableInputStream_CreateInstance, io_stm::OMarkableInputStream_getImplementationName,
io_stm::OMarkableInputStream_getSupportedServiceNames, createSingleComponentFactory, io_stm::OMarkableInputStream_getSupportedServiceNames, createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
io_stm::OMarkableOutputStream_CreateInstance, io_stm::OMarkableOutputStream_getImplementationName, io_stm::OMarkableOutputStream_CreateInstance, io_stm::OMarkableOutputStream_getImplementationName,
io_stm::OMarkableOutputStream_getSupportedServiceNames, createSingleComponentFactory, io_stm::OMarkableOutputStream_getSupportedServiceNames, createSingleComponentFactory,
0, 0 nullptr, 0
}, },
{ {
io_TextInputStream::TextInputStream_CreateInstance, io_TextInputStream::TextInputStream_getImplementationName , io_TextInputStream::TextInputStream_CreateInstance, io_TextInputStream::TextInputStream_getImplementationName ,
io_TextInputStream::TextInputStream_getSupportedServiceNames, createSingleComponentFactory , io_TextInputStream::TextInputStream_getSupportedServiceNames, createSingleComponentFactory ,
0, 0 nullptr, 0
}, },
{ {
io_TextOutputStream::TextOutputStream_CreateInstance, io_TextOutputStream::TextOutputStream_getImplementationName , io_TextOutputStream::TextOutputStream_CreateInstance, io_TextOutputStream::TextOutputStream_getImplementationName ,
io_TextOutputStream::TextOutputStream_getSupportedServiceNames, createSingleComponentFactory , io_TextOutputStream::TextOutputStream_getSupportedServiceNames, createSingleComponentFactory ,
0, 0 nullptr, 0
}, },
{0, 0, 0, 0, 0, 0} {nullptr, nullptr, nullptr, nullptr, nullptr, 0}
}; };
extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL io_component_getFactory( extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL io_component_getFactory(
......
...@@ -717,7 +717,7 @@ void OMarkableInputStream::closeInput() throw (NotConnectedException, RuntimeExc ...@@ -717,7 +717,7 @@ void OMarkableInputStream::closeInput() throw (NotConnectedException, RuntimeExc
setSuccessor( Reference< XConnectable >() ); setSuccessor( Reference< XConnectable >() );
delete m_pBuffer; delete m_pBuffer;
m_pBuffer = 0; m_pBuffer = nullptr;
m_nCurrentPos = 0; m_nCurrentPos = 0;
m_nCurrentMark = 0; m_nCurrentMark = 0;
} }
......
...@@ -263,7 +263,7 @@ void OPipeImpl::closeInput() ...@@ -263,7 +263,7 @@ void OPipeImpl::closeInput()
m_bInputStreamClosed = true; m_bInputStreamClosed = true;
delete m_pFIFO; delete m_pFIFO;
m_pFIFO = 0; m_pFIFO = nullptr;
// readBytes may throw an exception // readBytes may throw an exception
m_conditionBytesAvail.set(); m_conditionBytesAvail.set();
......
...@@ -105,7 +105,7 @@ namespace io_stm { ...@@ -105,7 +105,7 @@ namespace io_stm {
virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception ) override; virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(std::exception ) override;
}; };
Pump::Pump() : m_aThread( 0 ), Pump::Pump() : m_aThread( nullptr ),
m_cnt( m_aMutex ), m_cnt( m_aMutex ),
m_closeFired( false ) m_closeFired( false )
{ {
......
...@@ -52,7 +52,7 @@ void MemFIFO::skip( sal_Int32 nBytesToSkip ) throw ( css::io::BufferSizeExceeded ...@@ -52,7 +52,7 @@ void MemFIFO::skip( sal_Int32 nBytesToSkip ) throw ( css::io::BufferSizeExceeded
MemRingBuffer::MemRingBuffer() MemRingBuffer::MemRingBuffer()
{ {
m_nBufferLen = 0; m_nBufferLen = 0;
m_p = 0; m_p = nullptr;
m_nStart = 0; m_nStart = 0;
m_nOccupiedBuffer = 0; m_nOccupiedBuffer = 0;
} }
...@@ -187,7 +187,7 @@ void MemRingBuffer::shrink() throw () ...@@ -187,7 +187,7 @@ void MemRingBuffer::shrink() throw ()
if( m_p ) { if( m_p ) {
free( m_p ); free( m_p );
} }
m_p = 0; m_p = nullptr;
m_nBufferLen = 0; m_nBufferLen = 0;
m_nStart = 0; m_nStart = 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment