diff options
Diffstat (limited to 'libqpdf/QPDF_Dictionary.cc')
-rw-r--r-- | libqpdf/QPDF_Dictionary.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libqpdf/QPDF_Dictionary.cc b/libqpdf/QPDF_Dictionary.cc index 5349a2a8..43ad8a85 100644 --- a/libqpdf/QPDF_Dictionary.cc +++ b/libqpdf/QPDF_Dictionary.cc @@ -1,6 +1,10 @@ #include <qpdf/QPDF_Dictionary.hh> +#include <qpdf/QPDFObject_private.hh> #include <qpdf/QPDF_Name.hh> +#include <qpdf/QPDF_Null.hh> + +using namespace std::literals; QPDF_Dictionary::QPDF_Dictionary( std::map<std::string, QPDFObjectHandle> const& items) : @@ -97,12 +101,8 @@ QPDF_Dictionary::getKey(std::string const& key) // May be a null object return item->second; } else { - auto null = QPDFObjectHandle::newNull(); - if (qpdf != nullptr) { - null.setObjectDescription( - qpdf, getDescription() + " -> dictionary key " + key); - } - return null; + static auto constexpr msg = " -> dictionary key $VD"sv; + return QPDF_Null::create(shared_from_this(), msg, key); } } |