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

Unified Diff: fpdfsdk/src/formfiller/FFL_ListBox.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_ListBox.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
index 53a7570716b3b487d2d53a536ec0b9a3aa22decd..d00bfb12ff2b15be2d8e2c0e336e67329397ada1 100644
--- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp
+++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp
@@ -25,7 +25,6 @@ CFFL_ListBox::~CFFL_ListBox() {
PWL_CREATEPARAM CFFL_ListBox::GetCreateParam() {
PWL_CREATEPARAM cp = CFFL_FormFiller::GetCreateParam();
- ASSERT(m_pWidget != NULL);
FX_DWORD dwFieldFlag = m_pWidget->GetFieldFlags();
if (dwFieldFlag & FIELDFLAG_MULTISELECT) {
@@ -52,7 +51,6 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
pWnd->AttachFFLData(this);
pWnd->Create(cp);
- ASSERT(m_pApp != NULL);
CFFL_IFormFiller* pIFormFiller = m_pApp->GetIFormFiller();
pWnd->SetFillerNotify(pIFormFiller);
@@ -115,7 +113,7 @@ FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView) {
}
void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView) {
- ASSERT(m_pWidget != NULL);
+ ASSERT(m_pWidget);
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
CFX_IntArray aOldSelect, aNewSelect;
@@ -161,7 +159,6 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView,
} else {
if (CPWL_ListBox* pListBox =
(CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
- ASSERT(m_pWidget != NULL);
int32_t nCurSel = pListBox->GetCurSel();
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
@@ -173,7 +170,6 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView,
if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) {
fa.sValue = L"";
} else {
- ASSERT(m_pWidget != NULL);
int32_t nCurSel = m_pWidget->GetSelectedIndex(0);
if (nCurSel >= 0)
fa.sValue = m_pWidget->GetOptionLabel(nCurSel);
@@ -189,7 +185,7 @@ void CFFL_ListBox::SetActionData(CPDFSDK_PageView* pPageView,
const PDFSDK_FieldAction& fa) {}
void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView) {
- ASSERT(pPageView != NULL);
+ ASSERT(pPageView);
if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) {
for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; i++) {

Powered by Google App Engine
This is Rietveld 408576698