aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Dictionary.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-02-17 14:58:21 +0100
committerm-holger <m-holger@kubitscheck.org>2023-02-18 09:35:45 +0100
commit1496472e1c2f64f46d2d7d76481aef1aa3fff869 (patch)
tree40ed2ee4ac78c8240c36396f3fb1824d7703f952 /libqpdf/QPDF_Dictionary.cc
parentda14ab4dc7b1caee1708483cf714683f7d811ca7 (diff)
downloadqpdf-1496472e1c2f64f46d2d7d76481aef1aa3fff869.tar.zst
Add method QPDFValue::setChildDescription
Diffstat (limited to 'libqpdf/QPDF_Dictionary.cc')
-rw-r--r--libqpdf/QPDF_Dictionary.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc
index 5349a2a8..f45c00c6 100644
--- a/libqpdf/QPDF_Dictionary.cc
+++ b/libqpdf/QPDF_Dictionary.cc
@@ -1,7 +1,10 @@
#include <qpdf/QPDF_Dictionary.hh>
+#include <qpdf/QPDFObject_private.hh>
#include <qpdf/QPDF_Name.hh>
+using namespace std::literals;
+
QPDF_Dictionary::QPDF_Dictionary(
std::map<std::string, QPDFObjectHandle> const& items) :
QPDFValue(::ot_dictionary, "dictionary"),
@@ -98,10 +101,8 @@ QPDF_Dictionary::getKey(std::string const& key)
return item->second;
} else {
auto null = QPDFObjectHandle::newNull();
- if (qpdf != nullptr) {
- null.setObjectDescription(
- qpdf, getDescription() + " -> dictionary key " + key);
- }
+ static auto constexpr msg = " -> dictionary key $VD"sv;
+ null.getObj()->setChildDescription(shared_from_this(), msg, key);
return null;
}
}