summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-26 12:15:34 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-26 12:15:34 -0800
commit0370d6b8aab1b7880dd2727e7d9aed04cc358360 (patch)
tree3bfc178305c0184a2568999e20a00576cd064a56 /fpdfsdk
parent98909bf9f458614abc1bb7f4df34a319a1d5ce3f (diff)
downloadpdfium-0370d6b8aab1b7880dd2727e7d9aed04cc358360.tar.xz
Cleanup CPDF_StructElement.
Pre-cursor to properly ref-counting it. Rename to match the CPDF_/IPDF_ conventions. Move CPDF_ structure out of IPDF-defining headers. Break friendships. Review-Url: https://codereview.chromium.org/2640923006
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_structtree.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 9bc1df66f8..26ded3d460 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -83,7 +83,5 @@ FPDF_StructElement_GetChildAtIndex(FPDF_STRUCTELEMENT struct_element,
if (!elem || index < 0 || index >= elem->CountKids())
return nullptr;
- CPDF_StructKid kid = elem->GetKid(index);
- return kid.m_Type == CPDF_StructKid::Element ? kid.m_Element.m_pElement
- : nullptr;
+ return elem->GetKidIfElement(index);
}