Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: fpdfsdk/fpdf_structtree.cpp

Issue 2640923006: Cleanup CPDF_StructElement. (Closed)
Patch Set: Make CPDF_StructKid private Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/tagged_int.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdf_structtree.cpp
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 9bc1df66f8e07738a18de5b0612a424ce51f71ab..26ded3d46077bdc008ea77e5e166673b8b6ce5c9 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);
}
« no previous file with comments | « core/fpdfdoc/tagged_int.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698