diff options
author | tsepez <tsepez@chromium.org> | 2017-01-24 10:50:20 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2017-01-24 10:50:20 -0800 |
commit | 2763fba8755e3ef4bc15eb5c347ea2f291c6736a (patch) | |
tree | 086bf247a3342b11694be65d058bda70e6cf4ae7 /core/fpdfapi/page/cpdf_streamparser.h | |
parent | a60d5b901e90436fefc1012c7f38e83c9b35f3cf (diff) | |
download | pdfium-2763fba8755e3ef4bc15eb5c347ea2f291c6736a.tar.xz |
Replace some loose (ptr, len) pairs with CFX_ByteStringC in fpdfapi.
These separate scalars are an anti-pattern given the ability to pass a single entity and later operate on it sensibly.
Review-Url: https://codereview.chromium.org/2652033002
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamparser.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamparser.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_streamparser.h b/core/fpdfapi/page/cpdf_streamparser.h index ce01dd04ee..dc3b7dcb40 100644 --- a/core/fpdfapi/page/cpdf_streamparser.h +++ b/core/fpdfapi/page/cpdf_streamparser.h @@ -28,8 +28,9 @@ class CPDF_StreamParser { ~CPDF_StreamParser(); SyntaxType ParseNextElement(); - const uint8_t* GetWordBuf() const { return m_WordBuffer; } - uint32_t GetWordSize() const { return m_WordSize; } + CFX_ByteStringC GetWord() const { + return CFX_ByteStringC(m_WordBuffer, m_WordSize); + } uint32_t GetPos() const { return m_Pos; } void SetPos(uint32_t pos) { m_Pos = pos; } std::unique_ptr<CPDF_Object> GetObject() { return std::move(m_pLastObj); } |