diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-07-24 21:42:23 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-07-24 21:42:23 +0200 |
commit | b3e6d445cbf73da2b00062c3f639c2453041ee41 (patch) | |
tree | cf14f19721b0c555daa86371d93b069ce26c8013 /libqpdf/QPDFPageObjectHelper.cc | |
parent | 3661f2749a07ebd3733dca944a4ee990b658d864 (diff) | |
download | qpdf-b3e6d445cbf73da2b00062c3f639c2453041ee41.tar.zst |
Tweak "AndGet" mutator functions again
Remove any ambiguity around whether old or new value is being
returned.
Diffstat (limited to 'libqpdf/QPDFPageObjectHelper.cc')
-rw-r--r-- | libqpdf/QPDFPageObjectHelper.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDFPageObjectHelper.cc b/libqpdf/QPDFPageObjectHelper.cc index 96a8ce69..9ad75cf8 100644 --- a/libqpdf/QPDFPageObjectHelper.cc +++ b/libqpdf/QPDFPageObjectHelper.cc @@ -595,7 +595,7 @@ QPDFPageObjectHelper::removeUnreferencedResourcesHelper( for (auto const& iter: to_filter) { QPDFObjectHandle dict = resources.getKey(iter); if (dict.isDictionary()) { - dict = resources.replaceKeyAndGet(iter, dict.shallowCopy()); + dict = resources.replaceKeyAndGetNew(iter, dict.shallowCopy()); rdicts.push_back(dict); auto keys = dict.getKeys(); known_names.insert(keys.begin(), keys.end()); @@ -1110,8 +1110,8 @@ QPDFPageObjectHelper::copyAnnotations( afdh->addAndRenameFormFields(new_fields); auto annots = this->oh.getKey("/Annots"); if (!annots.isArray()) { - annots = - this->oh.replaceKeyAndGet("/Annots", QPDFObjectHandle::newArray()); + annots = this->oh.replaceKeyAndGetNew( + "/Annots", QPDFObjectHandle::newArray()); } for (auto const& annot: new_annots) { annots.appendItem(annot); |