diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-01-30 14:26:24 -0800 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-01-31 01:34:14 +0000 |
commit | 576e8151efab01166142ec697b66ce38b7bf6780 (patch) | |
tree | 3a5407e99f885419081e673726ece94b155e2d1c /xfa/fwl/cfwl_widgetmgr.cpp | |
parent | 3509d16d3f3538867c42689b2353cb394c1fd97b (diff) | |
download | pdfium-576e8151efab01166142ec697b66ce38b7bf6780.tar.xz |
Use std::vector and unique_ptr in xfa/fwl.
Change-Id: I21aeb1df387b60330d87a6cc82c615878c1f5596
Reviewed-on: https://pdfium-review.googlesource.com/2457
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_widgetmgr.cpp')
-rw-r--r-- | xfa/fwl/cfwl_widgetmgr.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/xfa/fwl/cfwl_widgetmgr.cpp b/xfa/fwl/cfwl_widgetmgr.cpp index dc3b383466..ea78c1a444 100644 --- a/xfa/fwl/cfwl_widgetmgr.cpp +++ b/xfa/fwl/cfwl_widgetmgr.cpp @@ -320,17 +320,18 @@ CFWL_Widget* CFWL_WidgetMgr::GetRadioButtonGroupHeader( return nullptr; } -void CFWL_WidgetMgr::GetSameGroupRadioButton( - CFWL_Widget* pRadioButton, - CFX_ArrayTemplate<CFWL_Widget*>& group) const { +std::vector<CFWL_Widget*> CFWL_WidgetMgr::GetSameGroupRadioButton( + CFWL_Widget* pRadioButton) const { CFWL_Widget* pFirst = GetFirstSiblingWidget(pRadioButton); if (!pFirst) pFirst = pRadioButton; - int32_t iGroup = CountRadioButtonGroup(pFirst); - if (iGroup < 2) - return; - group.Add(GetRadioButtonGroupHeader(pRadioButton)); + if (CountRadioButtonGroup(pFirst) < 2) + return std::vector<CFWL_Widget*>(); + + std::vector<CFWL_Widget*> group; + group.push_back(GetRadioButtonGroupHeader(pRadioButton)); + return group; } CFWL_Widget* CFWL_WidgetMgr::GetDefaultButton(CFWL_Widget* pParent) const { |