summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_streamcontentparser.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-09-14 18:00:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-09-14 18:00:54 +0000
commit4dc8c50f81bd78711bcfb432629800b8683102b6 (patch)
tree0c4f4b7d2311be5d8f93294199f2b6232df8c363 /core/fpdfapi/page/cpdf_streamcontentparser.h
parent6719c2f8c2e7bb3e28c86f638fb7914af6789285 (diff)
downloadpdfium-4dc8c50f81bd78711bcfb432629800b8683102b6.tar.xz
Make ContentParam::m_Name be a ByteString.
Currently this is an inline fixed-length char[] buffer. We make a byte string out of this in many places, and the current implementation still memcpy's, so the additional costs should be minimal. Next, we can avoid special-casing names that are longer than the fixed size. Change-Id: I980463cbb2325a9d6080bb51a6dfb0dbd1b704b1 Reviewed-on: https://pdfium-review.googlesource.com/42430 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.h')
-rw-r--r--core/fpdfapi/page/cpdf_streamcontentparser.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h
index 6417043305..d9239fd6fa 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.h
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.h
@@ -71,12 +71,9 @@ class CPDF_StreamContentParser {
~ContentParam();
Type m_Type;
- std::unique_ptr<CPDF_Object> m_pObject;
FX_Number m_Number;
- struct {
- int m_Len;
- char m_Buffer[32];
- } m_Name;
+ ByteString m_Name;
+ std::unique_ptr<CPDF_Object> m_pObject;
};
static const int kParamBufSize = 16;