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

Unified Diff: xfa/fwl/lightwidget/cfwl_combobox.cpp

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 months 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 | « xfa/fwl/lightwidget/cfwl_combobox.h ('k') | xfa/fwl/lightwidget/cfwl_datetimepicker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/lightwidget/cfwl_combobox.cpp
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.cpp b/xfa/fwl/lightwidget/cfwl_combobox.cpp
index 934b0d856e54c0d93169baed24a1ddc978cf2893..f20b4c1dcb156f9b1a4fd84451093c5e32ebb7b0 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_combobox.cpp
@@ -170,7 +170,7 @@ void* CFWL_ComboBox::GetItemData(int32_t iIndex) {
CFWL_ComboBoxItem* pItem =
static_cast<CFWL_ComboBoxItem*>(m_comboBoxData.GetItem(m_pIface, iIndex));
if (!pItem)
- return NULL;
+ return nullptr;
return pItem->m_pData;
}
@@ -351,9 +351,7 @@ FWL_Error CFWL_ComboBox::CFWL_ComboBoxDP::GetItemRect(IFWL_Widget* pWidget,
void* CFWL_ComboBox::CFWL_ComboBoxDP::GetItemData(IFWL_Widget* pWidget,
IFWL_ListItem* pItem) {
- if (!pItem)
- return NULL;
- return static_cast<CFWL_ComboBoxItem*>(pItem)->m_pData;
+ return pItem ? static_cast<CFWL_ComboBoxItem*>(pItem)->m_pData : nullptr;
}
FWL_Error CFWL_ComboBox::CFWL_ComboBoxDP::SetItemStyles(IFWL_Widget* pWidget,
@@ -390,9 +388,7 @@ FX_FLOAT CFWL_ComboBox::CFWL_ComboBoxDP::GetItemHeight(IFWL_Widget* pWidget) {
CFX_DIBitmap* CFWL_ComboBox::CFWL_ComboBoxDP::GetItemIcon(
IFWL_Widget* pWidget,
IFWL_ListItem* pItem) {
- if (!pItem)
- return NULL;
- return static_cast<CFWL_ComboBoxItem*>(pItem)->m_pDIB;
+ return pItem ? static_cast<CFWL_ComboBoxItem*>(pItem)->m_pDIB : nullptr;
}
FWL_Error CFWL_ComboBox::CFWL_ComboBoxDP::GetItemCheckRect(IFWL_Widget* pWidget,
« no previous file with comments | « xfa/fwl/lightwidget/cfwl_combobox.h ('k') | xfa/fwl/lightwidget/cfwl_datetimepicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698