aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAcroFormDocumentHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-09 20:35:56 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-09 23:33:29 +0200
commita68703b07e928be0eeb909c0e777e13e88cbf86d (patch)
treed63d53a9facc83d72cb82f400d1ae8cce6a2115f /libqpdf/QPDFAcroFormDocumentHelper.cc
parentae819b5318bf0a0a21b80d6269ef73ed8123d5d6 (diff)
downloadqpdf-a68703b07e928be0eeb909c0e777e13e88cbf86d.tar.zst
Replace PointerHolder with std::shared_ptr in library sources only
(patrepl and cleanpatch are my own utilities) patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh cleanpatch ./format-code
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index 276fc542..8a01f556 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -772,7 +772,7 @@ QPDFAcroFormDocumentHelper::adjustAppearanceStream(
QTC::TC("qpdf", "QPDFAcroFormDocumentHelper AP parse error");
}
auto rr = new ResourceReplacer(dr_map, rf.getNamesByResourceType());
- auto tf = PointerHolder<QPDFObjectHandle::TokenFilter>(rr);
+ auto tf = std::shared_ptr<QPDFObjectHandle::TokenFilter>(rr);
stream.addTokenFilter(tf);
} catch (std::exception& e) {
// No way to reproduce in test suite right now since error
@@ -792,13 +792,13 @@ QPDFAcroFormDocumentHelper::transformAnnotations(
QPDF* from_qpdf,
QPDFAcroFormDocumentHelper* from_afdh)
{
- PointerHolder<QPDFAcroFormDocumentHelper> afdhph;
+ std::shared_ptr<QPDFAcroFormDocumentHelper> afdhph;
if (!from_qpdf) {
// Assume these are from the same QPDF.
from_qpdf = &this->qpdf;
from_afdh = this;
} else if ((from_qpdf != &this->qpdf) && (!from_afdh)) {
- afdhph = make_pointer_holder<QPDFAcroFormDocumentHelper>(*from_qpdf);
+ afdhph = std::make_shared<QPDFAcroFormDocumentHelper>(*from_qpdf);
from_afdh = afdhph.get();
}
bool foreign = (from_qpdf != &this->qpdf);