summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditimg.cpp
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-17 17:23:22 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-17 21:40:41 +0000
commit46abb66cb57d4bc6b9326efd7a0c0e776e594db2 (patch)
treed0e3b8bada3ff24ac3cff44f4ae0ed990232448d /fpdfsdk/fpdfeditimg.cpp
parent26853181af1b28ba8070b955d90fb7a17fec2713 (diff)
downloadpdfium-46abb66cb57d4bc6b9326efd7a0c0e776e594db2.tar.xz
Use more static_cast in fpdfsdk
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 <thestig@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfeditimg.cpp')
-rw-r--r--fpdfsdk/fpdfeditimg.cpp6
1 files changed, 3 insertions, 3 deletions
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<IFX_SeekableReadStream> pFile =
MakeSeekableReadStream(fileAccess);
- CPDF_ImageObject* pImgObj = reinterpret_cast<CPDF_ImageObject*>(image_object);
+ CPDF_ImageObject* pImgObj = static_cast<CPDF_ImageObject*>(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<CPDF_ImageObject*>(image_object);
+ CPDF_ImageObject* pImgObj = static_cast<CPDF_ImageObject*>(image_object);
pImgObj->set_matrix(CFX_Matrix(static_cast<float>(a), static_cast<float>(b),
static_cast<float>(c), static_cast<float>(d),
static_cast<float>(e), static_cast<float>(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<CPDF_ImageObject*>(image_object);
+ CPDF_ImageObject* pImgObj = static_cast<CPDF_ImageObject*>(image_object);
for (int index = 0; index < nCount; index++) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(pages[index]);
if (pPage)