From 5cee3f28ead05cb336377483e24664c004af8b0a Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Fri, 25 May 2018 21:48:49 +0000 Subject: Mark more CPDF_Objects as const in action and bookmark code. Change-Id: Ib5f4cdb9c7f9c33561028a85029649ba68f4a6e5 Reviewed-on: https://pdfium-review.googlesource.com/32912 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- core/fpdfdoc/cpdf_action.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfdoc/cpdf_action.cpp') diff --git a/core/fpdfdoc/cpdf_action.cpp b/core/fpdfdoc/cpdf_action.cpp index 4ac86fe104..4a89a7d9ff 100644 --- a/core/fpdfdoc/cpdf_action.cpp +++ b/core/fpdfdoc/cpdf_action.cpp @@ -22,7 +22,7 @@ const char* const g_sATypes[] = { } // namespace -CPDF_Action::CPDF_Action(CPDF_Dictionary* pDict) : m_pDict(pDict) {} +CPDF_Action::CPDF_Action(const CPDF_Dictionary* pDict) : m_pDict(pDict) {} CPDF_Action::CPDF_Action(const CPDF_Action& that) = default; @@ -76,7 +76,7 @@ WideString CPDF_Action::GetFilePath() const { return CPDF_FileSpec(pFile).GetFileName(); if (type == "Launch") { - CPDF_Dictionary* pWinDict = m_pDict->GetDictFor("Win"); + const CPDF_Dictionary* pWinDict = m_pDict->GetDictFor("Win"); if (pWinDict) { return WideString::FromLocal( pWinDict->GetStringFor(pdfium::stream::kF).AsStringView()); @@ -94,7 +94,7 @@ ByteString CPDF_Action::GetURI(const CPDF_Document* pDoc) const { csURI = m_pDict->GetStringFor("URI"); const CPDF_Dictionary* pRoot = pDoc->GetRoot(); - CPDF_Dictionary* pURI = pRoot->GetDictFor("URI"); + const CPDF_Dictionary* pURI = pRoot->GetDictFor("URI"); if (pURI) { auto result = csURI.Find(":"); if (!result.has_value() || result.value() == 0) -- cgit v1.2.3