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

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

Issue 1512763013: Get rid of most instance of 'foo != NULL' (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nits 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
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_CheckBox.cpp ('k') | fpdfsdk/src/formfiller/FFL_FormFiller.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/formfiller/FFL_ComboBox.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
index 858cc6285a7fe64550a0453d52223de13c72d7f5..9458a14764b87751ad66d472db44c7e965c1a289 100644
--- a/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ComboBox.cpp
@@ -27,10 +27,7 @@ CFFL_ComboBox::~CFFL_ComboBox() {
PWL_CREATEPARAM CFFL_ComboBox::GetCreateParam() {
PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam();
- ASSERT(m_pWidget != NULL);
-
int nFlags = m_pWidget->GetFieldFlags();
-
if (nFlags & FIELDFLAG_EDIT) {
cp.dwFlags |= PCBS_ALLOWCUSTOMTEXT;
}
@@ -93,8 +90,6 @@ FX_BOOL CFFL_ComboBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
}
void CFFL_ComboBox::SaveData(CPDFSDK_PageView* pPageView) {
- ASSERT(m_pWidget != NULL);
-
if (CPWL_ComboBox* pWnd = (CPWL_ComboBox*)GetPDFWindow(pPageView, FALSE)) {
CFX_WideString swText = pWnd->GetText();
int32_t nCurSel = pWnd->GetSelect();
@@ -165,7 +160,6 @@ void CFFL_ComboBox::GetActionData(CPDFSDK_PageView* pPageView,
break;
case CPDF_AAction::LoseFocus:
case CPDF_AAction::GetFocus:
- ASSERT(m_pWidget != NULL);
fa.sValue = m_pWidget->GetValue();
break;
default:
@@ -207,7 +201,7 @@ FX_BOOL CFFL_ComboBox::IsActionDataChanged(CPDF_AAction::AActionType type,
}
void CFFL_ComboBox::SaveState(CPDFSDK_PageView* pPageView) {
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
if (CPWL_ComboBox* pComboBox =
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, FALSE))) {
@@ -221,7 +215,7 @@ void CFFL_ComboBox::SaveState(CPDFSDK_PageView* pPageView) {
}
void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView) {
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
if (CPWL_ComboBox* pComboBox =
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, TRUE))) {
@@ -257,9 +251,7 @@ CPWL_Wnd* CFFL_ComboBox::ResetPDFWindow(CPDFSDK_PageView* pPageView,
}
void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
- ASSERT(m_pApp != NULL);
-
- ASSERT(pWnd != NULL);
+ ASSERT(m_pApp);
if (pWnd->GetClassName() == PWL_CLASSNAME_EDIT) {
CPWL_Edit* pEdit = (CPWL_Edit*)pWnd;
@@ -279,11 +271,11 @@ void CFFL_ComboBox::OnSetFocus(CPWL_Wnd* pWnd) {
}
void CFFL_ComboBox::OnKillFocus(CPWL_Wnd* pWnd) {
- ASSERT(m_pApp != NULL);
+ ASSERT(m_pApp);
}
void CFFL_ComboBox::OnAddUndo(CPWL_Edit* pEdit) {
- ASSERT(pEdit != NULL);
+ ASSERT(pEdit);
}
CFX_WideString CFFL_ComboBox::GetSelectExportText() {
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_CheckBox.cpp ('k') | fpdfsdk/src/formfiller/FFL_FormFiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698