Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1736)

Unified Diff: fpdfsdk/src/formfiller/FFL_CheckBox.cpp

Issue 1529553003: Merge to XFA: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/formfiller/FFL_CheckBox.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp
index b0fc906f983d855f16ae79d60f7a37cad92f6658..0129707340da767181dd61e883e65c141c75f202 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();

Powered by Google App Engine
This is Rietveld 408576698