diff options
author | dsinclair <dsinclair@chromium.org> | 2016-06-23 12:40:16 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-23 12:40:16 -0700 |
commit | 85d1f2c2f9f1e746bedb1b6f03576613f54fbc27 (patch) | |
tree | ff5b393fb9b89f006327bee7bc8c955522defb67 /xfa/fwl/lightwidget/cfwl_combobox.cpp | |
parent | 6e12478cb298c3a8277493ee79ae0b73d6df8554 (diff) | |
download | pdfium-85d1f2c2f9f1e746bedb1b6f03576613f54fbc27.tar.xz |
Remove NULL in xfa/
This CL converts all NULL's to nullptr. All instances of comparison to nullptr
have been removed.
Review-Url: https://codereview.chromium.org/2095653002
Diffstat (limited to 'xfa/fwl/lightwidget/cfwl_combobox.cpp')
-rw-r--r-- | xfa/fwl/lightwidget/cfwl_combobox.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/xfa/fwl/lightwidget/cfwl_combobox.cpp b/xfa/fwl/lightwidget/cfwl_combobox.cpp index 9d20c97824..01b64dcd07 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, |