summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_binarybuf.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-16 20:51:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-16 20:51:08 +0000
commitaa987a9a895d42749c0f5e4092618fe7ded6667e (patch)
treecb90d6994b6badbf0ea279d08830df96175bb604 /core/fxcrt/cfx_binarybuf.h
parent0a4445ad1c3d76f8eb1b6b3e443a9a731430c237 (diff)
downloadpdfium-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.h')
-rw-r--r--core/fxcrt/cfx_binarybuf.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fxcrt/cfx_binarybuf.h b/core/fxcrt/cfx_binarybuf.h
index 2d4f019560..b519d57e10 100644
--- a/core/fxcrt/cfx_binarybuf.h
+++ b/core/fxcrt/cfx_binarybuf.h
@@ -24,7 +24,8 @@ class CFX_BinaryBuf {
bool IsEmpty() const { return GetLength() == 0; }
void Clear();
- void EstimateSize(size_t size, size_t alloc_step = 0);
+ void SetAllocStep(size_t step) { m_AllocStep = step; }
+ void EstimateSize(size_t size);
void AppendBlock(const void* pBuf, size_t size);
void AppendString(const ByteString& str) {
AppendBlock(str.c_str(), str.GetLength());
@@ -43,9 +44,9 @@ class CFX_BinaryBuf {
protected:
void ExpandBuf(size_t size);
- size_t m_AllocStep;
- size_t m_AllocSize;
- size_t m_DataSize;
+ size_t m_AllocStep = 0;
+ size_t m_AllocSize = 0;
+ size_t m_DataSize = 0;
std::unique_ptr<uint8_t, FxFreeDeleter> m_pBuffer;
};