From 994d8b4e363bb86128593a9000a17b0e79f849f5 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 10 Aug 2018 20:03:34 +0000 Subject: Remove const args and const_casts where not required. Introduce const/non-const versions of method where required. Part of the war on const_cast<>. Tidy one expression to use [] instead of .data(). Change-Id: I41e45669c79eee242ff2244c7dc3afcf6386a433 Reviewed-on: https://pdfium-review.googlesource.com/39852 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- core/fpdfapi/render/cpdf_imageloader.cpp | 4 ++-- core/fpdfapi/render/cpdf_imageloader.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fpdfapi/render') diff --git a/core/fpdfapi/render/cpdf_imageloader.cpp b/core/fpdfapi/render/cpdf_imageloader.cpp index c8f9013029..f3a626350b 100644 --- a/core/fpdfapi/render/cpdf_imageloader.cpp +++ b/core/fpdfapi/render/cpdf_imageloader.cpp @@ -21,14 +21,14 @@ CPDF_ImageLoader::CPDF_ImageLoader() CPDF_ImageLoader::~CPDF_ImageLoader() {} -bool CPDF_ImageLoader::Start(const CPDF_ImageObject* pImage, +bool CPDF_ImageLoader::Start(CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, bool bStdCS, uint32_t GroupFamily, bool bLoadMask, CPDF_RenderStatus* pRenderStatus) { m_pCache = pCache; - m_pImageObject = const_cast(pImage); + m_pImageObject = pImage; bool ret; if (pCache) { ret = pCache->StartGetCachedBitmap(m_pImageObject->GetImage(), bStdCS, diff --git a/core/fpdfapi/render/cpdf_imageloader.h b/core/fpdfapi/render/cpdf_imageloader.h index a4f313fb69..629609df48 100644 --- a/core/fpdfapi/render/cpdf_imageloader.h +++ b/core/fpdfapi/render/cpdf_imageloader.h @@ -23,7 +23,7 @@ class CPDF_ImageLoader { CPDF_ImageLoader(); ~CPDF_ImageLoader(); - bool Start(const CPDF_ImageObject* pImage, + bool Start(CPDF_ImageObject* pImage, CPDF_PageRenderCache* pCache, bool bStdCS, uint32_t GroupFamily, -- cgit v1.2.3