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

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

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master 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 9d20c9782496585254d339793707bff7bdd3ba8b..01b64dcd0719affc08b03ecd1026e346823a193b 100644
--- a/xfa/fwl/lightwidget/cfwl_combobox.cpp
+++ b/xfa/fwl/lightwidget/cfwl_combobox.cpp
@@ -169,9 +169,7 @@ FWL_Error CFWL_ComboBox::SetItemData(int32_t iIndex, void* pData) {
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 pItem->m_pData;
+ return pItem ? pItem->m_pData : nullptr;
}
FWL_Error CFWL_ComboBox::SetListTheme(IFWL_ThemeProvider* pTheme) {
@@ -357,9 +355,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,
@@ -396,9 +392,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