diff options
author | Lei Zhang <thestig@chromium.org> | 2018-03-21 18:39:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-03-21 18:39:06 +0000 |
commit | 36bbc24e2d7e5082047ad5b783c69518accafe42 (patch) | |
tree | 2978ab807455da2603ad9e7adc8f11f53d59ee00 /core/fpdfapi/page/cpdf_streamcontentparser.cpp | |
parent | a589b2c7b253179b71a7482ce2341009bb7b6b56 (diff) | |
download | pdfium-36bbc24e2d7e5082047ad5b783c69518accafe42.tar.xz |
Use more const pointers in CPDF_ContentMarkItem.
Transitively mark the same pointers as const in callers.
Change-Id: I1f9669b35c6d7f4b1a11c25163480bc687fbc7f8
Reviewed-on: https://pdfium-review.googlesource.com/28870
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp index 4e3857bf85..697349e987 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp +++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp @@ -586,10 +586,10 @@ void CPDF_StreamContentParser::Handle_EOFillStrokePath() { void CPDF_StreamContentParser::Handle_BeginMarkedContent_Dictionary() { ByteString tag = GetString(1); - CPDF_Object* pProperty = GetObject(0); - if (!pProperty) { + const CPDF_Object* pProperty = GetObject(0); + if (!pProperty) return; - } + bool bDirect = true; if (pProperty->IsName()) { pProperty = FindResourceObj("Properties", pProperty->GetString()); @@ -597,7 +597,7 @@ void CPDF_StreamContentParser::Handle_BeginMarkedContent_Dictionary() { return; bDirect = false; } - if (CPDF_Dictionary* pDict = pProperty->AsDictionary()) { + if (const CPDF_Dictionary* pDict = pProperty->AsDictionary()) { m_CurContentMark.AddMark(tag, pDict, bDirect); } } |