diff options
author | tsepez <tsepez@chromium.org> | 2016-09-13 06:46:40 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-13 06:46:40 -0700 |
commit | 067990ccf96ae962392a2dbacbfd8348dc4c7676 (patch) | |
tree | 5e6a1d32d1b19bc2f7ff4197693d8612737342fc /fpdfsdk/fxedit/fxet_list.cpp | |
parent | bb8935e9def5ad865be613eebea597a77fc7c547 (diff) | |
download | pdfium-067990ccf96ae962392a2dbacbfd8348dc4c7676.tar.xz |
Stop converting widestring -> c_str -> widestring in several places.
Avoids a needless alloc and copy.
Review-Url: https://codereview.chromium.org/2338553002
Diffstat (limited to 'fpdfsdk/fxedit/fxet_list.cpp')
-rw-r--r-- | fpdfsdk/fxedit/fxet_list.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/fxedit/fxet_list.cpp b/fpdfsdk/fxedit/fxet_list.cpp index 96fb60dcaa..7bf1bd8a27 100644 --- a/fpdfsdk/fxedit/fxet_list.cpp +++ b/fpdfsdk/fxedit/fxet_list.cpp @@ -49,7 +49,7 @@ void CFX_ListItem::SetSelect(FX_BOOL bSelected) { m_bSelected = bSelected; } -void CFX_ListItem::SetText(const FX_WCHAR* text) { +void CFX_ListItem::SetText(const CFX_WideString& text) { m_pEdit->SetText(text); } @@ -396,7 +396,7 @@ int32_t CFX_ListCtrl::GetSelect() const { return m_nSelItem; } -void CFX_ListCtrl::AddString(const FX_WCHAR* str) { +void CFX_ListCtrl::AddString(const CFX_WideString& str) { AddItem(str); ReArrange(GetCount() - 1); } @@ -677,7 +677,7 @@ void CFX_ListCtrl::SetFontSize(FX_FLOAT fFontSize) { m_fFontSize = fFontSize; } -void CFX_ListCtrl::AddItem(const FX_WCHAR* str) { +void CFX_ListCtrl::AddItem(const CFX_WideString& str) { CFX_ListItem* pListItem = new CFX_ListItem(); pListItem->SetFontMap(m_pFontMap); pListItem->SetFontSize(m_fFontSize); |