summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fxedit/fxet_list.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-08-13 15:24:19 -0700
committerLei Zhang <thestig@chromium.org>2015-08-13 15:24:19 -0700
commit388a3b0b8d6f75d47978c08299300f121f04884c (patch)
treefadc1a463409d762d66f3f82ea75af497b9c3268 /fpdfsdk/src/fxedit/fxet_list.cpp
parent5312f9a6ed88e653f4cfb604d892ca18da75e721 (diff)
downloadpdfium-388a3b0b8d6f75d47978c08299300f121f04884c.tar.xz
Remove if checks after new.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1287863002 .
Diffstat (limited to 'fpdfsdk/src/fxedit/fxet_list.cpp')
-rw-r--r--fpdfsdk/src/fxedit/fxet_list.cpp11
1 files changed, 5 insertions, 6 deletions
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) {