aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/NNTree.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/NNTree.cc
parentd8fdf632a979a7adb4a6423fd55ef1971fb06afd (diff)
downloadqpdf-ab9d557cb051b3568add22790cc58143c823e8df.tar.zst
Use fluent replaceKey
Diffstat (limited to 'libqpdf/NNTree.cc')
-rw-r--r--libqpdf/NNTree.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/libqpdf/NNTree.cc b/libqpdf/NNTree.cc
index 9d4e8ec7..a888f42f 100644
--- a/libqpdf/NNTree.cc
+++ b/libqpdf/NNTree.cc
@@ -341,9 +341,10 @@ NNTreeIterator::split(
first_node.replaceKey(key, first_half);
QPDFObjectHandle new_kids = QPDFObjectHandle::newArray();
new_kids.appendItem(first_node);
- to_split.removeKey("/Limits"); // already shouldn't be there for root
- to_split.removeKey(impl.details.itemsKey());
- to_split.replaceKey("/Kids", new_kids);
+ to_split
+ .removeKey("/Limits") // already shouldn't be there for root
+ .removeKey(impl.details.itemsKey())
+ .replaceKey("/Kids", new_kids);
if (is_leaf) {
QTC::TC("qpdf", "NNTree split root + leaf");
this->node = first_node;
@@ -884,9 +885,8 @@ NNTreeImpl::repair()
for (auto const& i : *this) {
repl.insert(i.first, i.second);
}
- this->oh.replaceKey("/Kids", new_node.getKey("/Kids"));
- this->oh.replaceKey(
- details.itemsKey(), new_node.getKey(details.itemsKey()));
+ this->oh.replaceKey("/Kids", new_node.getKey("/Kids"))
+ .replaceKey(details.itemsKey(), new_node.getKey(details.itemsKey()));
}
NNTreeImpl::iterator