diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2023-02-18 23:49:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-18 23:49:18 +0100 |
commit | b3cfa1010f95514a13590266dd50677445f74309 (patch) | |
tree | 68ff8d71c63d27d59d05b1b0d8ed503319463a91 /libqpdf/QPDF_Dictionary.cc | |
parent | e4e03e9ac10d8ea0c1a8ef8c78f0103068928822 (diff) | |
parent | 07bb5c3dd6213af9c9a64e17ae2d457cf4fc7190 (diff) | |
download | qpdf-b3cfa1010f95514a13590266dd50677445f74309.tar.zst |
Merge pull request #902 from m-holger/od
Refactor creation of object descriptions
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); } } |