summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_ppo.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-25 18:49:32 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-25 18:49:32 +0000
commite08d2b1fee0db40bac9538ca8b7be0a951675bd6 (patch)
tree81ded468a54adb247f46d7824632f6c4a537619c /fpdfsdk/fpdf_ppo.cpp
parenteb3ec8f29846a5df67269a53ca94d1d740c84513 (diff)
downloadpdfium-e08d2b1fee0db40bac9538ca8b7be0a951675bd6.tar.xz
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<std::remove_pointer<>, ...> Change-Id: I04a0ff43cb7d5a4d3867939a53a54c9cef00db86 Reviewed-on: https://pdfium-review.googlesource.com/31292 Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_ppo.cpp')
-rw-r--r--fpdfsdk/fpdf_ppo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_ppo.cpp b/fpdfsdk/fpdf_ppo.cpp
index 6daaf13704..0847113f86 100644
--- a/fpdfsdk/fpdf_ppo.cpp
+++ b/fpdfsdk/fpdf_ppo.cpp
@@ -26,7 +26,7 @@
#include "core/fxcrt/retain_ptr.h"
#include "core/fxcrt/unowned_ptr.h"
#include "fpdfsdk/cpdfsdk_helpers.h"
-#include "public/cpp/fpdf_deleters.h"
+#include "public/cpp/fpdf_scopers.h"
#include "third_party/base/ptr_util.h"
#include "third_party/base/stl_util.h"
@@ -778,8 +778,7 @@ FPDF_ImportNPagesToOne(FPDF_DOCUMENT src_doc,
return nullptr;
}
- std::unique_ptr<void, FPDFDocumentDeleter> output_doc(
- FPDF_CreateNewDocument());
+ ScopedFPDFDocument output_doc(FPDF_CreateNewDocument());
if (!output_doc)
return nullptr;