diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-01-04 14:49:12 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 20:09:31 +0000 |
commit | 86b5267ac4c2f169f105a1ea30cdf2eb0ea0b5dc (patch) | |
tree | 3915dfbd64eee6070f7c853b1f81acd38156a7ce /xfa/fxfa/parser/cxfa_attachnodelist.cpp | |
parent | de3f3fc5e16a2ee4fad2bdc0cda9e2ce73fd4fe3 (diff) | |
download | pdfium-86b5267ac4c2f169f105a1ea30cdf2eb0ea0b5dc.tar.xz |
Make indices for CXFA_List be size_t instead of int32_t
Change-Id: Id825e027a337636bb779f09bc0b1c6985a781fa1
Reviewed-on: https://pdfium-review.googlesource.com/22257
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_attachnodelist.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_attachnodelist.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xfa/fxfa/parser/cxfa_attachnodelist.cpp b/xfa/fxfa/parser/cxfa_attachnodelist.cpp index 3666b99bd4..2a4741175a 100644 --- a/xfa/fxfa/parser/cxfa_attachnodelist.cpp +++ b/xfa/fxfa/parser/cxfa_attachnodelist.cpp @@ -6,6 +6,7 @@ #include "xfa/fxfa/parser/cxfa_attachnodelist.h" +#include "third_party/base/numerics/safe_conversions.h" #include "xfa/fxfa/parser/cxfa_node.h" CXFA_AttachNodeList::CXFA_AttachNodeList(CXFA_Document* pDocument, @@ -40,8 +41,8 @@ bool CXFA_AttachNodeList::Remove(CXFA_Node* pNode) { return m_pAttachNode->RemoveChild(pNode, true); } -CXFA_Node* CXFA_AttachNodeList::Item(int32_t iIndex) { +CXFA_Node* CXFA_AttachNodeList::Item(size_t index) { return m_pAttachNode->GetChild<CXFA_Node>( - iIndex, XFA_Element::Unknown, + pdfium::base::checked_cast<int32_t>(index), XFA_Element::Unknown, m_pAttachNode->GetElementType() == XFA_Element::Subform); } |