diff options
author | Lei Zhang <thestig@chromium.org> | 2018-08-14 02:16:37 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-14 02:16:37 +0000 |
commit | 692aeadfe32d9aa9516cfdf7705b979db548d974 (patch) | |
tree | 2e4021d7054aa6ec606f624e7bb525ca2b3a6302 /core/fxcrt/cfx_memorystream.cpp | |
parent | ed176992eb7ddbb0fee7b79625501df06f8ccf93 (diff) | |
download | pdfium-692aeadfe32d9aa9516cfdf7705b979db548d974.tar.xz |
Remove |bTakeOver| parameter from CFX_MemoryStream ctor.
It is always true now.
BUG=pdfium:263
Change-Id: I74fd0091f5815701718e8cd5acc6e7a0de772a85
Reviewed-on: https://pdfium-review.googlesource.com/40031
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_memorystream.cpp')
-rw-r--r-- | core/fxcrt/cfx_memorystream.cpp | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/core/fxcrt/cfx_memorystream.cpp b/core/fxcrt/cfx_memorystream.cpp index 15cde78f42..b0a0bd91d1 100644 --- a/core/fxcrt/cfx_memorystream.cpp +++ b/core/fxcrt/cfx_memorystream.cpp @@ -17,26 +17,16 @@ constexpr size_t kBlockSize = 64 * 1024; } // namespace CFX_MemoryStream::CFX_MemoryStream(bool bConsecutive) - : m_nTotalSize(0), - m_nCurSize(0), - m_bConsecutive(bConsecutive), - m_bTakeOver(true) {} - -CFX_MemoryStream::CFX_MemoryStream(uint8_t* pBuffer, - size_t nSize, - bool bTakeOver) - : m_nTotalSize(nSize), - m_nCurSize(nSize), - m_bConsecutive(true), - m_bTakeOver(bTakeOver) { + : m_nTotalSize(0), m_nCurSize(0), m_bConsecutive(bConsecutive) {} + +CFX_MemoryStream::CFX_MemoryStream(uint8_t* pBuffer, size_t nSize) + : m_nTotalSize(nSize), m_nCurSize(nSize), m_bConsecutive(true) { m_Blocks.push_back(pBuffer); } CFX_MemoryStream::~CFX_MemoryStream() { - if (m_bTakeOver) { - for (uint8_t* pBlock : m_Blocks) - FX_Free(pBlock); - } + for (uint8_t* pBlock : m_Blocks) + FX_Free(pBlock); } FX_FILESIZE CFX_MemoryStream::GetSize() { |