summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Stream.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-12-16 15:53:47 +0100
committerJay Berkenbilt <jberkenbilt@users.noreply.github.com>2022-12-31 16:23:59 +0100
commite684d8169bc866c413b269005c7645fd28146d10 (patch)
tree79d70c6f6c0d161b4d3810b6a0235d661ef3a926 /libqpdf/QPDF_Stream.cc
parent218f069a69ef74d0b0cc9c7ba0796e9360cef379 (diff)
downloadqpdf-e684d8169bc866c413b269005c7645fd28146d10.tar.zst
Make QPDFValue::object_description a shared pointer
Diffstat (limited to 'libqpdf/QPDF_Stream.cc')
-rw-r--r--libqpdf/QPDF_Stream.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc
index 7ff7a1b8..b5aac026 100644
--- a/libqpdf/QPDF_Stream.cc
+++ b/libqpdf/QPDF_Stream.cc
@@ -123,10 +123,9 @@ QPDF_Stream::QPDF_Stream(
throw std::logic_error("stream object instantiated with non-dictionary "
"object for dictionary");
}
- setDescription(
- qpdf,
- qpdf->getFilename() + ", stream object " + og.unparse(' '),
- offset);
+ auto descr = std::make_shared<std::string>(
+ qpdf->getFilename() + ", stream object " + og.unparse(' '));
+ setDescription(qpdf, descr, offset);
}
std::shared_ptr<QPDFObject>
@@ -284,7 +283,7 @@ QPDF_Stream::getStreamJSON(
void
QPDF_Stream::setDescription(
- QPDF* qpdf, std::string const& description, qpdf_offset_t offset)
+ QPDF* qpdf, std::shared_ptr<std::string>& description, qpdf_offset_t offset)
{
this->QPDFValue::setDescription(qpdf, description, offset);
setDictDescription();