summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-12-14 18:10:25 -0800
committerLei Zhang <thestig@chromium.org>2015-12-14 18:10:25 -0800
commite3c7c2b54348da4a6939f6672f6c6bff126815a7 (patch)
tree68cc9bebdd5f4f055bfa7de116862091709b4054 /fpdfsdk/src/formfiller/FFL_CheckBox.cpp
parentba41a35553573ab718026e8508e1e32107db6595 (diff)
downloadpdfium-e3c7c2b54348da4a6939f6672f6c6bff126815a7.tar.xz
Get rid of most instance of 'foo != NULL'
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1512763013 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CheckBox.cpp')
-rw-r--r--fpdfsdk/src/formfiller/FFL_CheckBox.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
index b0fc906f98..0129707340 100644
--- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
@@ -20,10 +20,7 @@ CPWL_Wnd* CFFL_CheckBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
CPDFSDK_PageView* pPageView) {
CPWL_CheckBox* pWnd = new CPWL_CheckBox();
pWnd->Create(cp);
-
- ASSERT(m_pWidget != NULL);
pWnd->SetCheck(m_pWidget->IsChecked());
-
return pWnd;
}
@@ -45,10 +42,10 @@ FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot,
case FWL_VKEY_Return:
case FWL_VKEY_Space: {
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
- ASSERT(pIFormFiller != NULL);
+ ASSERT(pIFormFiller);
CPDFSDK_PageView* pPageView = pAnnot->GetPageView();
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
FX_BOOL bReset = FALSE;
FX_BOOL bExit = FALSE;
@@ -94,18 +91,11 @@ FX_BOOL CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView* pPageView,
}
FX_BOOL CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
- ASSERT(m_pWidget != NULL);
-
- if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE)) {
- return pWnd->IsChecked() != m_pWidget->IsChecked();
- }
-
- return FALSE;
+ CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE);
+ return pWnd && pWnd->IsChecked() != m_pWidget->IsChecked();
}
void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) {
- ASSERT(m_pWidget != NULL);
-
if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE)) {
FX_BOOL bNewChecked = pWnd->IsChecked();