From e08d2b1fee0db40bac9538ca8b7be0a951675bd6 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 25 Apr 2018 18:49:32 +0000 Subject: Introduce ScopedFPDF types in public/cpp/fpdf_scopers.h Applies std::remove_ptr to the public API types so that we can deduce a correct unique ptr type no matter how that API might change away from void* usage. Creates shorter names for std::unique_ptr, ...> Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86 Reviewed-on: https://pdfium-review.googlesource.com/31292 Reviewed-by: Lei Zhang Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- samples/pdfium_test_dump_helper.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'samples/pdfium_test_dump_helper.cc') diff --git a/samples/pdfium_test_dump_helper.cc b/samples/pdfium_test_dump_helper.cc index 729a4cd152..2b422a93fb 100644 --- a/samples/pdfium_test_dump_helper.cc +++ b/samples/pdfium_test_dump_helper.cc @@ -11,7 +11,7 @@ #include #include -#include "public/cpp/fpdf_deleters.h" +#include "public/cpp/fpdf_scopers.h" #include "testing/test_support.h" namespace { @@ -55,8 +55,7 @@ void DumpChildStructure(FPDF_STRUCTELEMENT child, int indent) { } void DumpPageStructure(FPDF_PAGE page, const int page_idx) { - std::unique_ptr tree( - FPDF_StructTree_GetForPage(page)); + ScopedFPDFStructTree tree(FPDF_StructTree_GetForPage(page)); if (!tree) { fprintf(stderr, "Failed to load struct tree for page %d\n", page_idx); return; -- cgit v1.2.3