diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-07 15:09:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-04-10 08:52:26 +0200 |
commit | 52117bb8c337c98c200b6846c8d9fa2d1831ac51 (patch) | |
tree | 9fa9c0d76690e12d633622c4afa7115c5bec1dcf /tools | |
parent | abd8c3646e1295e68fe317bc1a02148a1b5f41a4 (diff) |
loplugin:inlinefields in INetMIMEMessageStream
Change-Id: I675b53a55e02899f0cf325245cedb298f6903281
Reviewed-on: https://gerrit.libreoffice.org/36266
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/inet/inetstrm.cxx | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index 99716a13f5e9..156a24599190 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -34,7 +34,7 @@ int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uIntPtr nSize) sal_uIntPtr i, n; - if (pMsgBuffer->Tell() == 0) + if (maMsgBuffer.Tell() == 0) { // Insert formatted header into buffer. n = pSourceMsg->GetHeaderCount(); @@ -44,15 +44,15 @@ int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uIntPtr nSize) if (aHeader.GetValue().getLength()) { // NYI: Folding long lines. - pMsgBuffer->WriteCharPtr( aHeader.GetName().getStr() ); - pMsgBuffer->WriteCharPtr( ": " ); - pMsgBuffer->WriteCharPtr( aHeader.GetValue().getStr() ); - pMsgBuffer->WriteCharPtr( "\r\n" ); + maMsgBuffer.WriteCharPtr( aHeader.GetName().getStr() ); + maMsgBuffer.WriteCharPtr( ": " ); + maMsgBuffer.WriteCharPtr( aHeader.GetValue().getStr() ); + maMsgBuffer.WriteCharPtr( "\r\n" ); } } - pMsgWrite = const_cast<char *>(static_cast<sal_Char const *>(pMsgBuffer->GetData())); - pMsgRead = pMsgWrite + pMsgBuffer->Tell(); + pMsgWrite = const_cast<char *>(static_cast<sal_Char const *>(maMsgBuffer.GetData())); + pMsgRead = pMsgWrite + maMsgBuffer.Tell(); } n = pMsgRead - pMsgWrite; @@ -65,7 +65,7 @@ int INetMIMEMessageStream::GetHeaderLine(sal_Char* pData, sal_uIntPtr nSize) else { // Reset buffer. - pMsgBuffer->Seek(STREAM_SEEK_TO_BEGIN); + maMsgBuffer.Seek(STREAM_SEEK_TO_BEGIN); } return (pWBuf - pData); @@ -234,7 +234,6 @@ INetMIMEMessageStream::INetMIMEMessageStream( pSourceMsg(pMsg), bHeaderGenerated(headerGenerated), pMsgStrm(nullptr), - pMsgBuffer(new SvMemoryStream), pMsgRead(nullptr), pMsgWrite(nullptr), done(false), @@ -242,7 +241,7 @@ INetMIMEMessageStream::INetMIMEMessageStream( pChildStrm(nullptr) { assert(pMsg != nullptr); - pMsgBuffer->SetStreamCharSet(RTL_TEXTENCODING_ASCII_US); + maMsgBuffer.SetStreamCharSet(RTL_TEXTENCODING_ASCII_US); pBuffer = new sal_Char[BUFFER_SIZE]; pRead = pWrite = pBuffer; } @@ -251,7 +250,6 @@ INetMIMEMessageStream::~INetMIMEMessageStream() { delete pChildStrm; delete [] pBuffer; - delete pMsgBuffer; delete pMsgStrm; } |