From 9b8b217e6f8f2ff03b09d6075e689804928c7b3c Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 25 Apr 2018 22:12:34 +0000 Subject: Replace reinterpret_cast with static_cast where possible Change-Id: Ic62f1def8e043494c9fa6c08a937d7d872513567 Reviewed-on: https://pdfium-review.googlesource.com/31314 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- fpdfsdk/cpdfsdk_xfawidgethandler.cpp | 2 +- fpdfsdk/fpdf_catalog_unittest.cpp | 2 +- fpdfsdk/fpdf_doc_unittest.cpp | 2 +- fpdfsdk/fpdf_view.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index 16692b3d25..1a8ec69ba2 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -70,7 +70,7 @@ void CPDFSDK_XFAWidgetHandler::OnDraw(CPDFSDK_PageView* pPageView, void CPDFSDK_XFAWidgetHandler::OnLoad(CPDFSDK_Annot* pAnnot) {} void CPDFSDK_XFAWidgetHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { - CPDFSDK_XFAWidget* pWidget = reinterpret_cast(pAnnot); + CPDFSDK_XFAWidget* pWidget = static_cast(pAnnot); CPDFSDK_InterForm* pInterForm = pWidget->GetInterForm(); pInterForm->RemoveXFAMap(pWidget->GetXFAWidget()); diff --git a/fpdfsdk/fpdf_catalog_unittest.cpp b/fpdfsdk/fpdf_catalog_unittest.cpp index 5bb55594eb..648cb24e7a 100644 --- a/fpdfsdk/fpdf_catalog_unittest.cpp +++ b/fpdfsdk/fpdf_catalog_unittest.cpp @@ -36,7 +36,7 @@ class CPDF_TestXFAContext : public CPDFXFA_Context { : CPDFXFA_Context(pdfium::MakeUnique()) {} void SetRoot(CPDF_Dictionary* root) { - reinterpret_cast(GetPDFDoc())->SetRoot(root); + static_cast(GetPDFDoc())->SetRoot(root); } CPDF_IndirectObjectHolder* GetHolder() { return GetPDFDoc(); } diff --git a/fpdfsdk/fpdf_doc_unittest.cpp b/fpdfsdk/fpdf_doc_unittest.cpp index 0aea5534da..bfd42628d1 100644 --- a/fpdfsdk/fpdf_doc_unittest.cpp +++ b/fpdfsdk/fpdf_doc_unittest.cpp @@ -41,7 +41,7 @@ class CPDF_TestXFAContext : public CPDFXFA_Context { : CPDFXFA_Context(pdfium::MakeUnique()) {} void SetRoot(CPDF_Dictionary* root) { - reinterpret_cast(GetPDFDoc())->SetRoot(root); + static_cast(GetPDFDoc())->SetRoot(root); } CPDF_IndirectObjectHolder* GetHolder() { return GetPDFDoc(); } diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index 28e42a8e81..0015716d98 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -1158,5 +1158,5 @@ FPDF_EXPORT FPDF_DEST FPDF_CALLCONV FPDF_GetNamedDest(FPDF_DOCUMENT document, } else { *buflen = -1; } - return (FPDF_DEST)pDestObj; + return pDestObj; } -- cgit v1.2.3