From 0a6dbeffbc61f2140b1b845f6791c1b15b34cbd7 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 26 Jun 2018 18:42:28 +0000 Subject: Add some more consts to unowned pointers. Ideally, unowned ptrs might well be const, as updating something through an unowned reference is best avoided. Change-Id: Ida8111ffe0ee1e30bbf6b7718b0929dfb5cafdff Reviewed-on: https://pdfium-review.googlesource.com/36050 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fpdfapi/edit/cpdf_creator.h | 2 +- core/fpdfapi/edit/cpdf_pagecontentmanager.cpp | 2 +- core/fpdfapi/edit/cpdf_pagecontentmanager.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi/edit') diff --git a/core/fpdfapi/edit/cpdf_creator.h b/core/fpdfapi/edit/cpdf_creator.h index 079f1c2666..a7261145e9 100644 --- a/core/fpdfapi/edit/cpdf_creator.h +++ b/core/fpdfapi/edit/cpdf_creator.h @@ -77,7 +77,7 @@ class CPDF_Creator { CPDF_CryptoHandler* GetCryptoHandler(); UnownedPtr const m_pDocument; - UnownedPtr const m_pParser; + UnownedPtr const m_pParser; UnownedPtr m_pEncryptDict; fxcrt::MaybeOwned m_pSecurityHandler; UnownedPtr m_pMetadata; diff --git a/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp b/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp index 3ba23a88fb..b635144b36 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentmanager.cpp @@ -16,7 +16,7 @@ #include "core/fpdfapi/parser/cpdf_stream.h" CPDF_PageContentManager::CPDF_PageContentManager( - CPDF_PageObjectHolder* obj_holder) + const CPDF_PageObjectHolder* obj_holder) : obj_holder_(obj_holder), doc_(obj_holder_->GetDocument()) { CPDF_Dictionary* page_dict = obj_holder_->GetDict(); CPDF_Object* contents_obj = page_dict->GetObjectFor("Contents"); diff --git a/core/fpdfapi/edit/cpdf_pagecontentmanager.h b/core/fpdfapi/edit/cpdf_pagecontentmanager.h index bad8c7a38c..b49b403a75 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentmanager.h +++ b/core/fpdfapi/edit/cpdf_pagecontentmanager.h @@ -18,7 +18,7 @@ class CPDF_PageObjectHolder; class CPDF_PageContentManager { public: - explicit CPDF_PageContentManager(CPDF_PageObjectHolder* pObjHolder); + explicit CPDF_PageContentManager(const CPDF_PageObjectHolder* pObjHolder); ~CPDF_PageContentManager(); // Gets the Content stream at a given index. If Contents is a single stream @@ -39,7 +39,7 @@ class CPDF_PageContentManager { void ExecuteScheduledRemovals(); private: - UnownedPtr const obj_holder_; + UnownedPtr const obj_holder_; UnownedPtr const doc_; UnownedPtr contents_array_; UnownedPtr contents_stream_; -- cgit v1.2.3