summaryrefslogtreecommitdiff
path: root/core/fpdftext
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-03-21 18:39:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-21 18:39:06 +0000
commit36bbc24e2d7e5082047ad5b783c69518accafe42 (patch)
tree2978ab807455da2603ad9e7adc8f11f53d59ee00 /core/fpdftext
parenta589b2c7b253179b71a7482ce2341009bb7b6b56 (diff)
downloadpdfium-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/fpdftext')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index a5eb14579e..e2d1f5f0a6 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -799,13 +799,13 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
WideString actText;
bool bExist = false;
- CPDF_Dictionary* pDict = nullptr;
+ const CPDF_Dictionary* pDict = nullptr;
for (size_t i = 0; i < nContentMark; ++i) {
const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(i);
pDict = item.GetParam();
if (!pDict)
continue;
- CPDF_String* temp = ToString(pDict->GetObjectFor("ActualText"));
+ const CPDF_String* temp = ToString(pDict->GetObjectFor("ActualText"));
if (temp) {
bExist = true;
actText = temp->GetUnicodeText();
@@ -862,7 +862,7 @@ void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
WideString actText;
for (int n = 0; n < nContentMark; n++) {
const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(n);
- CPDF_Dictionary* pDict = item.GetParam();
+ const CPDF_Dictionary* pDict = item.GetParam();
if (pDict)
actText = pDict->GetUnicodeTextFor("ActualText");
}