From e56b3ad57573c677ad84bf4a2ffd649d6134b990 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 25 Jan 2016 16:41:00 -0800 Subject: Fix a bunch of pointless returns. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1637693002 . --- fpdfsdk/src/fsdk_annothandler.cpp | 8 ++------ fpdfsdk/src/fsdk_baseannot.cpp | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/src/fsdk_annothandler.cpp b/fpdfsdk/src/fsdk_annothandler.cpp index feaee74428..a8dff91fd2 100644 --- a/fpdfsdk/src/fsdk_annothandler.cpp +++ b/fpdfsdk/src/fsdk_annothandler.cpp @@ -205,10 +205,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, @@ -216,10 +214,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 9540c5766d..aa9c0459b5 100644 --- a/fpdfsdk/src/fsdk_baseannot.cpp +++ b/fpdfsdk/src/fsdk_baseannot.cpp @@ -957,8 +957,6 @@ void CPDFSDK_BAAnnot::Annot_OnDraw(CFX_RenderDevice* pDevice, m_pAnnot->GetAPForm(m_pPageView->GetPDFPage(), CPDF_Annot::Normal); m_pAnnot->DrawAppearance(m_pPageView->GetPDFPage(), pDevice, pUser2Device, CPDF_Annot::Normal, NULL); - - return; } UnderlyingPageType* CPDFSDK_Annot::GetUnderlyingPage() { @@ -966,7 +964,5 @@ 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; } -- cgit v1.2.3