diff options
Diffstat (limited to 'libqpdf')
-rw-r--r-- | libqpdf/QPDF_Unresolved.cc | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDFValue.hh | 13 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDFValueProxy.hh | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/libqpdf/QPDF_Unresolved.cc b/libqpdf/QPDF_Unresolved.cc index f72281c0..503e5b84 100644 --- a/libqpdf/QPDF_Unresolved.cc +++ b/libqpdf/QPDF_Unresolved.cc @@ -18,7 +18,7 @@ QPDF_Unresolved::shallowCopy() { throw std::logic_error( "attempted to shallow copy unresolved QPDFObjectHandle"); - return create(qpdf, og); + return nullptr; } std::string diff --git a/libqpdf/qpdf/QPDFValue.hh b/libqpdf/qpdf/QPDFValue.hh index bac573d6..69f7eeda 100644 --- a/libqpdf/qpdf/QPDFValue.hh +++ b/libqpdf/qpdf/QPDFValue.hh @@ -24,22 +24,22 @@ class QPDFValue virtual std::string unparse() = 0; virtual JSON getJSON(int json_version) = 0; virtual void - setDescription(QPDF* qpdf, std::string const& description) + setDescription(QPDF* qpdf_p, std::string const& description) { - owning_qpdf = qpdf; + qpdf = qpdf_p; object_description = description; } bool - getDescription(QPDF*& qpdf, std::string& description) + getDescription(QPDF*& qpdf_p, std::string& description) { - qpdf = owning_qpdf; + qpdf_p = qpdf; description = object_description; - return owning_qpdf != nullptr; + return qpdf != nullptr; } bool hasDescription() { - return owning_qpdf != nullptr; + return qpdf != nullptr && !object_description.empty(); } void setParsedOffset(qpdf_offset_t offset) @@ -92,7 +92,6 @@ class QPDFValue private: QPDFValue(QPDFValue const&) = delete; QPDFValue& operator=(QPDFValue const&) = delete; - QPDF* owning_qpdf{nullptr}; std::string object_description; qpdf_offset_t parsed_offset{-1}; const qpdf_object_type_e type_code; diff --git a/libqpdf/qpdf/QPDFValueProxy.hh b/libqpdf/qpdf/QPDFValueProxy.hh index e190318c..992ad115 100644 --- a/libqpdf/qpdf/QPDFValueProxy.hh +++ b/libqpdf/qpdf/QPDFValueProxy.hh @@ -49,7 +49,7 @@ class QPDFValueProxy { return value->type_name; } - // Returns nullptr for direct objects + QPDF* getQPDF() const { |