Index: fpdfsdk/src/fsdk_annothandler.cpp |
diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp |
index e0c49411a9a0f2435b7c2b32a5caa6d308e478bb..bdfda15453feb118ebf685a57aa8071dfb9009f2 100644 |
--- a/fpdfsdk/src/fsdk_annothandler.cpp |
+++ b/fpdfsdk/src/fsdk_annothandler.cpp |
@@ -137,14 +137,15 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnDraw(CPDFSDK_PageView* pPageView, |
CFX_RenderDevice* pDevice, |
CPDF_Matrix* pUser2Device, |
FX_DWORD dwFlags) { |
- ASSERT(pAnnot != NULL); |
+ ASSERT(pAnnot); |
if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { |
pAnnotHandler->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); |
} else { |
- if (!pAnnot->IsXFAField()) |
- ((CPDFSDK_BAAnnot*)pAnnot) |
- ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); |
+ if (!pAnnot->IsXFAField()) { |
+ static_cast<CPDFSDK_BAAnnot*>(pAnnot) |
+ ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); |
+ } |
} |
} |
@@ -449,12 +450,11 @@ void CPDFSDK_BFAnnotHandler::OnDraw(CPDFSDK_PageView* pPageView, |
CFX_RenderDevice* pDevice, |
CPDF_Matrix* pUser2Device, |
FX_DWORD dwFlags) { |
- ASSERT(pAnnot != NULL); |
CFX_ByteString sSubType = pAnnot->GetSubType(); |
if (sSubType == BFFT_SIGNATURE) { |
- ((CPDFSDK_BAAnnot*)pAnnot) |
- ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, NULL); |
+ static_cast<CPDFSDK_BAAnnot*>(pAnnot) |
+ ->DrawAppearance(pDevice, pUser2Device, CPDF_Annot::Normal, nullptr); |
} else { |
if (m_pFormFiller) { |
m_pFormFiller->OnDraw(pPageView, pAnnot, pDevice, pUser2Device, dwFlags); |