From 05e67415684adc36af228ca2f1e0efc30a40d242 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 25 Jan 2016 16:35:42 -0800 Subject: XFA: Fix a bunch of pointless returns. And a few other nits. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1635853002 . --- fpdfsdk/src/fsdk_annothandler.cpp | 8 ++------ fpdfsdk/src/fsdk_baseannot.cpp | 8 ++------ 2 files changed, 4 insertions(+), 12 deletions(-) (limited to 'fpdfsdk/src') diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp index 08d33a2e37..2f204fe27d 100644 --- a/fpdfsdk/src/fsdk_annothandler.cpp +++ b/fpdfsdk/src/fsdk_annothandler.cpp @@ -240,10 +240,8 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseEnter(CPDFSDK_PageView* pPageView, FX_DWORD nFlag) { ASSERT(pAnnot); - if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { + if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) pAnnotHandler->OnMouseEnter(pPageView, pAnnot, nFlag); - } - return; } void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView, @@ -251,10 +249,8 @@ void CPDFSDK_AnnotHandlerMgr::Annot_OnMouseExit(CPDFSDK_PageView* pPageView, FX_DWORD nFlag) { ASSERT(pAnnot); - if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) { + if (IPDFSDK_AnnotHandler* pAnnotHandler = GetAnnotHandler(pAnnot)) pAnnotHandler->OnMouseExit(pPageView, pAnnot, nFlag); - } - return; } FX_BOOL CPDFSDK_AnnotHandlerMgr::Annot_OnChar(CPDFSDK_Annot* pAnnot, diff --git a/fpdfsdk/src/fsdk_baseannot.cpp b/fpdfsdk/src/fsdk_baseannot.cpp index 30e702241e..0d65e06b38 100644 --- a/fpdfsdk/src/fsdk_baseannot.cpp +++ b/fpdfsdk/src/fsdk_baseannot.cpp @@ -978,15 +978,11 @@ UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() { } CPDF_Page* CPDFSDK_Annot::GetPDFPage() { - if (m_pPageView) - return m_pPageView->GetPDFPage(); - return NULL; + return m_pPageView ? m_pPageView->GetPDFPage() : nullptr; } #ifdef PDF_ENABLE_XFA CPDFXFA_Page* CPDFSDK_Annot::GetPDFXFAPage() { - if (m_pPageView) - return m_pPageView->GetPDFXFAPage(); - return NULL; + return m_pPageView ? m_pPageView->GetPDFXFAPage() : nullptr; } #endif // PDF_ENABLE_XFA -- cgit v1.2.3