aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFAcroFormDocumentHelper.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-30 02:39:54 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-30 02:39:54 +0200
commitab9d557cb051b3568add22790cc58143c823e8df (patch)
treee594455ab528c90ceb95b05ecda17ea1495cd247 /libqpdf/QPDFAcroFormDocumentHelper.cc
parentd8fdf632a979a7adb4a6423fd55ef1971fb06afd (diff)
downloadqpdf-ab9d557cb051b3568add22790cc58143c823e8df.tar.zst
Use fluent replaceKey
Diffstat (limited to 'libqpdf/QPDFAcroFormDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFAcroFormDocumentHelper.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/libqpdf/QPDFAcroFormDocumentHelper.cc b/libqpdf/QPDFAcroFormDocumentHelper.cc
index 2bb52f44..811570b5 100644
--- a/libqpdf/QPDFAcroFormDocumentHelper.cc
+++ b/libqpdf/QPDFAcroFormDocumentHelper.cc
@@ -748,8 +748,7 @@ QPDFAcroFormDocumentHelper::adjustAppearanceStream(
auto existing_old = subdict.getKey(old_key);
if (!existing_old.isNull()) {
QTC::TC("qpdf", "QPDFAcroFormDocumentHelper ap rename");
- subdict.replaceKey(new_key, existing_old);
- subdict.removeKey(old_key);
+ subdict.replaceKey(new_key, existing_old).removeKey(old_key);
}
}
}