Commit fe74f28dc4f269e4bf944ae61d77874f81f95daf
1 parent
f989de1b
Refactor QPDFValue::setDefaultDescription
Showing
2 changed files
with
3 additions
and
6 deletions
libqpdf/QPDFValue.cc
libqpdf/qpdf/QPDFValue.hh
| @@ -40,11 +40,6 @@ class QPDFValue | @@ -40,11 +40,6 @@ class QPDFValue | ||
| 40 | void | 40 | void |
| 41 | setDefaultDescription(QPDF* a_qpdf, QPDFObjGen const& a_og) | 41 | setDefaultDescription(QPDF* a_qpdf, QPDFObjGen const& a_og) |
| 42 | { | 42 | { |
| 43 | - static auto default_description{ | ||
| 44 | - std::make_shared<Description>("object $OG")}; | ||
| 45 | - if (!object_description) { | ||
| 46 | - object_description = default_description; | ||
| 47 | - } | ||
| 48 | qpdf = a_qpdf; | 43 | qpdf = a_qpdf; |
| 49 | og = a_og; | 44 | og = a_og; |
| 50 | } | 45 | } |
| @@ -52,7 +47,7 @@ class QPDFValue | @@ -52,7 +47,7 @@ class QPDFValue | ||
| 52 | bool | 47 | bool |
| 53 | hasDescription() | 48 | hasDescription() |
| 54 | { | 49 | { |
| 55 | - return object_description != nullptr; | 50 | + return object_description || og.isIndirect(); |
| 56 | } | 51 | } |
| 57 | void | 52 | void |
| 58 | setParsedOffset(qpdf_offset_t offset) | 53 | setParsedOffset(qpdf_offset_t offset) |