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/fde/css/fde_cssstyleselector.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/fde/css/fde_cssstyleselector.cpp')
-rw-r--r-- | xfa/fde/css/fde_cssstyleselector.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xfa/fde/css/fde_cssstyleselector.cpp b/xfa/fde/css/fde_cssstyleselector.cpp index 1bcd161f0c..117afcc7ab 100644 --- a/xfa/fde/css/fde_cssstyleselector.cpp +++ b/xfa/fde/css/fde_cssstyleselector.cpp @@ -9,6 +9,7 @@ #include <algorithm> #include <memory> +#include "third_party/base/stl_util.h" #include "xfa/fde/css/fde_csscache.h" #include "xfa/fde/css/fde_cssdeclaration.h" #include "xfa/fde/css/fde_cssstylesheet.h" @@ -1749,7 +1750,8 @@ IFDE_CSSParagraphStyle* CFDE_CSSComputedStyle::GetParagraphStyles() { bool CFDE_CSSComputedStyle::GetCustomStyle(const CFX_WideStringC& wsName, CFX_WideString& wsValue) const { - for (int32_t i = m_CustomProperties.GetSize() - 2; i > -1; i -= 2) { + for (int32_t i = pdfium::CollectionSize<int32_t>(m_CustomProperties) - 2; + i > -1; i -= 2) { if (wsName == m_CustomProperties[i]) { wsValue = m_CustomProperties[i + 1]; return true; @@ -1895,8 +1897,8 @@ void CFDE_CSSComputedStyle::SetLetterSpacing( void CFDE_CSSComputedStyle::AddCustomStyle(const CFX_WideString& wsName, const CFX_WideString& wsValue) { - m_CustomProperties.Add(wsName); - m_CustomProperties.Add(wsValue); + m_CustomProperties.push_back(wsName); + m_CustomProperties.push_back(wsValue); } CFDE_CSSInheritedData::CFDE_CSSInheritedData() { |