From e00660b5fa41956db06c557807b68a1117d1b70b Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 13 Aug 2015 15:40:18 -0700 Subject: Merge to XFA: Remove if checks after new. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287863002 . (cherry picked from commit 388a3b0b8d6f75d47978c08299300f121f04884c) Review URL: https://codereview.chromium.org/1292653002 . --- fpdfsdk/src/fxedit/fxet_list.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'fpdfsdk/src/fxedit') diff --git a/fpdfsdk/src/fxedit/fxet_list.cpp b/fpdfsdk/src/fxedit/fxet_list.cpp index 70dc8d5262..ff4723e514 100644 --- a/fpdfsdk/src/fxedit/fxet_list.cpp +++ b/fpdfsdk/src/fxedit/fxet_list.cpp @@ -128,12 +128,11 @@ void CFX_List::SetFontSize(FX_FLOAT fFontSize) { } void CFX_List::AddItem(const FX_WCHAR* str) { - if (CFX_ListItem* pListItem = new CFX_ListItem()) { - pListItem->SetFontMap(m_pFontMap); - pListItem->SetFontSize(m_fFontSize); - pListItem->SetText(str); - m_aListItems.Add(pListItem); - } + CFX_ListItem* pListItem = new CFX_ListItem(); + pListItem->SetFontMap(m_pFontMap); + pListItem->SetFontSize(m_fFontSize); + pListItem->SetText(str); + m_aListItems.Add(pListItem); } void CFX_List::ReArrange(int32_t nItemIndex) { -- cgit v1.2.3