diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2016-06-04 16:19:23 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2016-07-16 18:27:18 +0200 |
commit | 7b2966dbf283b168fa0cc1eadf989387ab6e25b9 (patch) | |
tree | 9f54a9f4b5ce4145302680f9d69850201235a3f7 /tools | |
parent | 30d722a8f91b667cf56cab2ab6e2f5b2ed18408c (diff) |
nBufSiz can be a non-class local constant
Change-Id: I2a7d32eabd01622261a1163781ac2a8b64bdee3f
Diffstat (limited to 'tools')
-rw-r--r-- | tools/source/inet/inetstrm.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index f1082a1f0486..99716a13f5e9 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -222,11 +222,17 @@ int INetMIMEMessageStream::GetMsgLine(sal_Char* pData, sal_uIntPtr nSize) } } +namespace +{ + +const int BUFFER_SIZE = 2048; + +} + INetMIMEMessageStream::INetMIMEMessageStream( INetMIMEMessage *pMsg, bool headerGenerated): pSourceMsg(pMsg), bHeaderGenerated(headerGenerated), - nBufSiz(2048), pMsgStrm(nullptr), pMsgBuffer(new SvMemoryStream), pMsgRead(nullptr), @@ -237,7 +243,7 @@ INetMIMEMessageStream::INetMIMEMessageStream( { assert(pMsg != nullptr); pMsgBuffer->SetStreamCharSet(RTL_TEXTENCODING_ASCII_US); - pBuffer = new sal_Char[nBufSiz]; + pBuffer = new sal_Char[BUFFER_SIZE]; pRead = pWrite = pBuffer; } @@ -271,7 +277,7 @@ int INetMIMEMessageStream::Read(sal_Char* pData, sal_uIntPtr nSize) pRead = pWrite = pBuffer; // Read next message line. - int nRead = GetMsgLine(pBuffer, nBufSiz); + int nRead = GetMsgLine(pBuffer, BUFFER_SIZE); if (nRead > 0) { // Set read pointer. |