diff options
author | tsepez <tsepez@chromium.org> | 2016-12-08 10:55:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-08 10:55:57 -0800 |
commit | 51709bea3ce113df7d36a5fe6415036e26fc3236 (patch) | |
tree | ff2cc5da9de834bda8cbc5c92d45c9a5c00b21c3 /xfa/fxfa/app/xfa_ffchoicelist.cpp | |
parent | 447b1f3ffc7e0df233d15300bbf8a85ce2bc7278 (diff) | |
download | pdfium-51709bea3ce113df7d36a5fe6415036e26fc3236.tar.xz |
Replace CFX_WideStringArray with std::vector
Minimalist changes with the tidying of the code to
use better loop iterators as a follow-up.
Review-Url: https://codereview.chromium.org/2556963004
Diffstat (limited to 'xfa/fxfa/app/xfa_ffchoicelist.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_ffchoicelist.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index 72284d6ef7..d19fd6876b 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -6,7 +6,10 @@ #include "xfa/fxfa/app/xfa_ffchoicelist.h" +#include <vector> + #include "third_party/base/ptr_util.h" +#include "third_party/base/stl_util.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/cfwl_combobox.h" #include "xfa/fwl/cfwl_edit.h" @@ -50,9 +53,9 @@ bool CXFA_FFListBox::LoadWidget() { m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); - CFX_WideStringArray wsLabelArray; + std::vector<CFX_WideString> wsLabelArray; m_pDataAcc->GetChoiceListItems(wsLabelArray, false); - int32_t iItems = wsLabelArray.GetSize(); + int32_t iItems = pdfium::CollectionSize<int32_t>(wsLabelArray); for (int32_t i = 0; i < iItems; i++) { pListBox->AddString(wsLabelArray[i].AsStringC()); } @@ -247,9 +250,9 @@ bool CXFA_FFComboBox::LoadWidget() { m_pNormalWidget->SetDelegate(this); m_pNormalWidget->LockUpdate(); - CFX_WideStringArray wsLabelArray; + std::vector<CFX_WideString> wsLabelArray; m_pDataAcc->GetChoiceListItems(wsLabelArray, false); - int32_t iItems = wsLabelArray.GetSize(); + int32_t iItems = pdfium::CollectionSize<int32_t>(wsLabelArray); for (int32_t i = 0; i < iItems; i++) { pComboBox->AddString(wsLabelArray[i].AsStringC()); } |