diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-06-25 16:00:31 +0200 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-06-25 17:10:06 +0200 |
commit | 7836e1974726f379b96d980cfa39561cfab2e0ff (patch) | |
tree | 05df586bf946547b5be3bdaf1fad2bc2e7e8cf3f /libqpdf/NNTree.cc | |
parent | 3b3bcab349ace035252d40908d58159d83f4d506 (diff) | |
download | qpdf-7836e1974726f379b96d980cfa39561cfab2e0ff.tar.zst |
Code tidy: remove redundant calls to QPDFObjectHandle::isInitialized
Diffstat (limited to 'libqpdf/NNTree.cc')
-rw-r--r-- | libqpdf/NNTree.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libqpdf/NNTree.cc b/libqpdf/NNTree.cc index a5df209d..94464468 100644 --- a/libqpdf/NNTree.cc +++ b/libqpdf/NNTree.cc @@ -56,8 +56,7 @@ NNTreeIterator::updateIValue(bool allow_invalid) // measure, we also call updateIValue in operator* and operator->. bool okay = false; - if ((item_number >= 0) && this->node.isInitialized() && - this->node.isDictionary()) { + if ((item_number >= 0) && this->node.isDictionary()) { auto items = this->node.getKey(impl.details.itemsKey()); if (this->item_number + 1 < items.getArrayNItems()) { okay = true; @@ -987,10 +986,10 @@ NNTreeImpl::insertFirst(QPDFObjectHandle key, QPDFObjectHandle value) { auto iter = begin(); QPDFObjectHandle items; - if (iter.node.isInitialized() && iter.node.isDictionary()) { + if (iter.node.isDictionary()) { items = iter.node.getKey(details.itemsKey()); } - if (!(items.isInitialized() && items.isArray())) { + if (!(items.isArray())) { QTC::TC("qpdf", "NNTree no valid items node in insertFirst"); error(qpdf, this->oh, "unable to find a valid items node"); } |