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_widget.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_widget.cpp')
-rw-r--r-- | xfa/fwl/cfwl_widget.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fwl/cfwl_widget.cpp b/xfa/fwl/cfwl_widget.cpp index 301ad5fc9d..e7085ba405 100644 --- a/xfa/fwl/cfwl_widget.cpp +++ b/xfa/fwl/cfwl_widget.cpp @@ -8,7 +8,9 @@ #include <algorithm> #include <utility> +#include <vector> +#include "third_party/base/stl_util.h" #include "xfa/fde/tto/fde_textout.h" #include "xfa/fwl/cfwl_app.h" #include "xfa/fwl/cfwl_combobox.h" @@ -220,19 +222,18 @@ CFX_Matrix CFWL_Widget::GetMatrix() { return CFX_Matrix(); CFWL_Widget* parent = GetParent(); - CFX_ArrayTemplate<CFWL_Widget*> parents; + std::vector<CFWL_Widget*> parents; while (parent) { - parents.Add(parent); + parents.push_back(parent); parent = parent->GetParent(); } CFX_Matrix matrix; CFX_Matrix ctmOnParent; CFX_RectF rect; - int32_t count = parents.GetSize(); + int32_t count = pdfium::CollectionSize<int32_t>(parents); for (int32_t i = count - 2; i >= 0; i--) { - parent = parents.GetAt(i); - + parent = parents[i]; if (parent->m_pProperties) ctmOnParent.SetIdentity(); rect = parent->GetWidgetRect(); @@ -242,8 +243,7 @@ CFX_Matrix CFWL_Widget::GetMatrix() { CFX_Matrix m; m.SetIdentity(); matrix.Concat(m, true); - parents.RemoveAll(); - + parents.clear(); return matrix; } |