aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFWriter.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-11-16 17:26:04 +0100
committerm-holger <m-holger@kubitscheck.org>2023-11-18 17:34:17 +0100
commit3237ef70fb77ce323394de1e2793abdb5ae85384 (patch)
tree2b8e132b26017507db151174944651741d3b71d1 /libqpdf/QPDFWriter.cc
parentd11622b6fd8a2d050414c3e6110f3ad68f7502af (diff)
downloadqpdf-3237ef70fb77ce323394de1e2793abdb5ae85384.tar.zst
Add new method Pl_Buffer::getString
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r--libqpdf/QPDFWriter.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index db3b42e0..664ea5ff 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -1579,10 +1579,7 @@ QPDFWriter::unparseObject(
m->cur_data_key.length());
pl.writeString(val);
pl.finish();
- auto buf = bufpl.getBufferSharedPointer();
- val = QPDF_String(
- std::string(reinterpret_cast<char*>(buf->getBuffer()), buf->getSize()))
- .unparse(true);
+ val = QPDF_String(bufpl.getString()).unparse(true);
} else {
auto tmp_ph = QUtil::make_unique_cstr(val);
char* tmp = tmp_ph.get();