From 54ef2cb9eb5b145c6e973e95ccb488e121556ad7 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 9 May 2018 20:13:42 +0000 Subject: Mark numerious pointers as const. They are mostly CPDF_Object* and derived classes, but others that should be are marked const as well. Change-Id: Ib3344d7d8db90940df8edc97c0dd6c59da080541 Reviewed-on: https://pdfium-review.googlesource.com/32180 Commit-Queue: Lei Zhang Reviewed-by: Henrique Nakashima --- core/fpdfapi/page/cpdf_function.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'core/fpdfapi/page/cpdf_function.h') diff --git a/core/fpdfapi/page/cpdf_function.h b/core/fpdfapi/page/cpdf_function.h index 82a3a54327..c2f2a4bb4e 100644 --- a/core/fpdfapi/page/cpdf_function.h +++ b/core/fpdfapi/page/cpdf_function.h @@ -25,7 +25,7 @@ class CPDF_Function { kType4PostScript = 4, }; - static std::unique_ptr Load(CPDF_Object* pFuncObj); + static std::unique_ptr Load(const CPDF_Object* pFuncObj); static Type IntegerToFunctionType(int iType); virtual ~CPDF_Function(); @@ -51,10 +51,12 @@ class CPDF_Function { protected: explicit CPDF_Function(Type type); - static std::unique_ptr Load(CPDF_Object* pFuncObj, - std::set* pVisited); - bool Init(CPDF_Object* pObj, std::set* pVisited); - virtual bool v_Init(CPDF_Object* pObj, std::set* pVisited) = 0; + static std::unique_ptr Load( + const CPDF_Object* pFuncObj, + std::set* pVisited); + bool Init(const CPDF_Object* pObj, std::set* pVisited); + virtual bool v_Init(const CPDF_Object* pObj, + std::set* pVisited) = 0; virtual bool v_Call(const float* inputs, float* results) const = 0; uint32_t m_nInputs; -- cgit v1.2.3