From ec35156ab0fef078600e6d3551178adf73b87b3b Mon Sep 17 00:00:00 2001 From: m-holger Date: Sat, 31 Dec 2022 12:13:32 +0000 Subject: Refactor QPDFValue::getDescription Remove parameters and return the description. --- libqpdf/QPDF_Dictionary.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libqpdf/QPDF_Dictionary.cc') diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc index 1df4f8f0..87d93a32 100644 --- a/libqpdf/QPDF_Dictionary.cc +++ b/libqpdf/QPDF_Dictionary.cc @@ -84,12 +84,10 @@ QPDF_Dictionary::getKey(std::string const& key) // May be a null object return item->second; } else { - QPDFObjectHandle null = QPDFObjectHandle::newNull(); - QPDF* qpdf = nullptr; - std::string description; - if (getDescription(qpdf, description)) { + auto null = QPDFObjectHandle::newNull(); + if (qpdf != nullptr) { null.setObjectDescription( - qpdf, description + " -> dictionary key " + key); + qpdf, getDescription() + " -> dictionary key " + key); } return null; } -- cgit v1.2.3-70-g09d2