diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-12-16 17:31:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-16 17:31:11 +0100 |
commit | b0b6d9f21fe77fb7b46469529bf252f0dbcaa551 (patch) | |
tree | 612562863dbf4364e41e2086b701b92761c18e72 /libqpdf/QPDFAcroFormDocumentHelper.cc | |
parent | d7a364b882be44c93dc4a843bcca2ae63e805c2c (diff) | |
parent | 368666899fe24885fbe05ea03688fa985645ebd9 (diff) | |
download | qpdf-b0b6d9f21fe77fb7b46469529bf252f0dbcaa551.tar.zst |
Merge pull request #1067 from m-holger/pl_buff
Reduce copying of Buffer contents
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r-- | libqpdf/QPDFAcroFormDocumentHelper.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc index 5a54bf75..f2daa0c7 100644 --- a/libqpdf/QPDFAcroFormDocumentHelper.cc +++ b/libqpdf/QPDFAcroFormDocumentHelper.cc @@ -584,8 +584,7 @@ QPDFAcroFormDocumentHelper::adjustDefaultAppearances( ResourceReplacer rr(dr_map, rf.getNamesByResourceType()); Pl_Buffer buf_pl("filtered DA"); da_stream.filterAsContents(&rr, &buf_pl); - auto buf = buf_pl.getBufferSharedPointer(); - std::string new_da(reinterpret_cast<char*>(buf->getBuffer()), buf->getSize()); + std::string new_da = buf_pl.getString(); obj.replaceKey("/DA", QPDFObjectHandle::newString(new_da)); } |