diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-16 20:51:08 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-16 20:51:08 +0000 |
commit | aa987a9a895d42749c0f5e4092618fe7ded6667e (patch) | |
tree | cb90d6994b6badbf0ea279d08830df96175bb604 /core/fxcrt/cfx_binarybuf.cpp | |
parent | 0a4445ad1c3d76f8eb1b6b3e443a9a731430c237 (diff) | |
download | pdfium-aa987a9a895d42749c0f5e4092618fe7ded6667e.tar.xz |
Remove default arg from CFX_BinaryBuf::EstimateSize().
Disentangle setting an allocation step from estimating size, these
separate concepts can be handled separately.
Change-Id: I27bf3e193018a4377ccf266207b889fdb672826c
Reviewed-on: https://pdfium-review.googlesource.com/40210
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_binarybuf.cpp')
-rw-r--r-- | core/fxcrt/cfx_binarybuf.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/fxcrt/cfx_binarybuf.cpp b/core/fxcrt/cfx_binarybuf.cpp index 5ef907cb80..67aa29263b 100644 --- a/core/fxcrt/cfx_binarybuf.cpp +++ b/core/fxcrt/cfx_binarybuf.cpp @@ -9,8 +9,7 @@ #include <algorithm> #include <utility> -CFX_BinaryBuf::CFX_BinaryBuf() - : m_AllocStep(0), m_AllocSize(0), m_DataSize(0) {} +CFX_BinaryBuf::CFX_BinaryBuf() = default; CFX_BinaryBuf::~CFX_BinaryBuf() = default; @@ -37,8 +36,7 @@ std::unique_ptr<uint8_t, FxFreeDeleter> CFX_BinaryBuf::DetachBuffer() { return std::move(m_pBuffer); } -void CFX_BinaryBuf::EstimateSize(size_t size, size_t step) { - m_AllocStep = step; +void CFX_BinaryBuf::EstimateSize(size_t size) { if (m_AllocSize < size) ExpandBuf(size - m_DataSize); } |