aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFWriter.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-07-24 21:42:23 +0200
committerJay Berkenbilt <ejb@ql.org>2022-07-24 21:42:23 +0200
commitb3e6d445cbf73da2b00062c3f639c2453041ee41 (patch)
treecf14f19721b0c555daa86371d93b069ce26c8013 /libqpdf/QPDFWriter.cc
parent3661f2749a07ebd3733dca944a4ee990b658d864 (diff)
downloadqpdf-b3e6d445cbf73da2b00062c3f639c2453041ee41.tar.zst
Tweak "AndGet" mutator functions again
Remove any ambiguity around whether old or new value is being returned.
Diffstat (limited to 'libqpdf/QPDFWriter.cc')
-rw-r--r--libqpdf/QPDFWriter.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libqpdf/QPDFWriter.cc b/libqpdf/QPDFWriter.cc
index 50ec9406..888c3967 100644
--- a/libqpdf/QPDFWriter.cc
+++ b/libqpdf/QPDFWriter.cc
@@ -1571,7 +1571,7 @@ QPDFWriter::unparseObject(
"qpdf",
"QPDFWriter create Extensions",
this->m->qdf_mode ? 0 : 1);
- extensions = object.replaceKeyAndGet(
+ extensions = object.replaceKeyAndGetNew(
"/Extensions", QPDFObjectHandle::newDictionary());
}
} else if (!have_extensions_other) {
@@ -2277,7 +2277,7 @@ QPDFWriter::prepareFileForWrite()
if (oh.isIndirect()) {
QTC::TC("qpdf", "QPDFWriter make Extensions direct");
extensions_indirect = true;
- oh = root.replaceKeyAndGet(key, oh.shallowCopy());
+ oh = root.replaceKeyAndGetNew(key, oh.shallowCopy());
}
if (oh.hasKey("/ADBE")) {
QPDFObjectHandle adbe = oh.getKey("/ADBE");