summaryrefslogtreecommitdiff
path: root/public/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'public/cpp')
-rw-r--r--public/cpp/fpdf_deleters.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/cpp/fpdf_deleters.h b/public/cpp/fpdf_deleters.h
index 238ef30e62..51e7cba7f8 100644
--- a/public/cpp/fpdf_deleters.h
+++ b/public/cpp/fpdf_deleters.h
@@ -5,6 +5,7 @@
#ifndef PUBLIC_CPP_FPDF_DELETERS_H_
#define PUBLIC_CPP_FPDF_DELETERS_H_
+#include "public/fpdf_annot.h"
#include "public/fpdf_dataavail.h"
#include "public/fpdf_edit.h"
#include "public/fpdf_formfill.h"
@@ -14,6 +15,10 @@
// Custom deleters for using FPDF_* types with std::unique_ptr<>.
+struct FPDFAnnotationDeleter {
+ inline void operator()(FPDF_ANNOTATION annot) { FPDFPage_CloseAnnot(annot); }
+};
+
struct FPDFAvailDeleter {
inline void operator()(FPDF_AVAIL avail) { FPDFAvail_Destroy(avail); }
};