From d5b81ce5722398cc8c259d76e7cd1a5ddc2c562f Mon Sep 17 00:00:00 2001 From: tsepez Date: Fri, 16 Dec 2016 14:45:46 -0800 Subject: Return unique_ptr<> from IPDF_StructTree Delete some dead code in the process. Review-Url: https://codereview.chromium.org/2585873002 --- fpdfsdk/fpdf_structtree.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fpdfsdk') 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) { -- cgit v1.2.3