summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-12-16 14:45:46 -0800
committerCommit bot <commit-bot@chromium.org>2016-12-16 14:45:46 -0800
commitd5b81ce5722398cc8c259d76e7cd1a5ddc2c562f (patch)
tree3daa9b7e6c691a358b83ac9797bffe27753b2964 /fpdfsdk
parentad3cd2aeff15bd31aa38544063075d910ac63823 (diff)
downloadpdfium-d5b81ce5722398cc8c259d76e7cd1a5ddc2c562f.tar.xz
Return unique_ptr<> from IPDF_StructTree
Delete some dead code in the process. Review-Url: https://codereview.chromium.org/2585873002
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_structtree.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp
index 541c46b378..9bc1df66f8 100644
--- a/fpdfsdk/fpdf_structtree.cpp
+++ b/fpdfsdk/fpdf_structtree.cpp
@@ -25,7 +25,8 @@ DLLEXPORT FPDF_STRUCTTREE STDCALL FPDF_StructTree_GetForPage(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (!pPage)
return nullptr;
- return IPDF_StructTree::LoadPage(pPage->m_pDocument, pPage->m_pFormDict);
+ return IPDF_StructTree::LoadPage(pPage->m_pDocument, pPage->m_pFormDict)
+ .release();
}
DLLEXPORT void STDCALL FPDF_StructTree_Close(FPDF_STRUCTTREE struct_tree) {