From 46abb66cb57d4bc6b9326efd7a0c0e776e594db2 Mon Sep 17 00:00:00 2001 From: Nicolas Pena Date: Wed, 17 May 2017 17:23:22 -0400 Subject: Use more static_cast in fpdfsdk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL replaces some reinterpret_cast with static_cast in fpdfsdk. It also removes an obsolete comment in fpdfedit.h Change-Id: I36c29bfcd6382490a8c955b50ccfa4c93ab351c7 Reviewed-on: https://pdfium-review.googlesource.com/5632 Reviewed-by: Lei Zhang Commit-Queue: Nicolás Peña --- fpdfsdk/fpdfeditimg.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fpdfsdk/fpdfeditimg.cpp') diff --git a/fpdfsdk/fpdfeditimg.cpp b/fpdfsdk/fpdfeditimg.cpp index 6a300c9e62..9f4b2968ee 100644 --- a/fpdfsdk/fpdfeditimg.cpp +++ b/fpdfsdk/fpdfeditimg.cpp @@ -25,7 +25,7 @@ bool LoadJpegHelper(FPDF_PAGE* pages, CFX_RetainPtr pFile = MakeSeekableReadStream(fileAccess); - CPDF_ImageObject* pImgObj = reinterpret_cast(image_object); + CPDF_ImageObject* pImgObj = static_cast(image_object); if (pages) { for (int index = 0; index < nCount; index++) { @@ -82,7 +82,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetMatrix(FPDF_PAGEOBJECT image_object, if (!image_object) return false; - CPDF_ImageObject* pImgObj = reinterpret_cast(image_object); + CPDF_ImageObject* pImgObj = static_cast(image_object); pImgObj->set_matrix(CFX_Matrix(static_cast(a), static_cast(b), static_cast(c), static_cast(d), static_cast(e), static_cast(f))); @@ -97,7 +97,7 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFImageObj_SetBitmap(FPDF_PAGE* pages, if (!image_object || !bitmap || !pages) return false; - CPDF_ImageObject* pImgObj = reinterpret_cast(image_object); + CPDF_ImageObject* pImgObj = static_cast(image_object); for (int index = 0; index < nCount; index++) { CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]); if (pPage) -- cgit v1.2.3