diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-08-02 13:33:07 +0200 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2022-08-31 23:45:45 +0200 |
commit | bd300be08d94add92657aef1d46afd100459302b (patch) | |
tree | 3a7e5c1d85e8139f5a143eb810781331801fd92f | |
parent | a078202c1b5823f1c13a4c559619158054029e73 (diff) | |
download | qpdf-bd300be08d94add92657aef1d46afd100459302b.tar.zst |
Replace calls to QPDFObjectHandle::Factory::newIndirect where possible
-rw-r--r-- | libqpdf/QPDF.cc | 4 | ||||
-rw-r--r-- | libqpdf/QPDF_linearization.cc | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc index 6ae74b25..c39e2456 100644 --- a/libqpdf/QPDF.cc +++ b/libqpdf/QPDF.cc @@ -1397,7 +1397,7 @@ QPDF::fixDanglingReferences(bool force) std::list<QPDFObjectHandle> queue; queue.push_back(this->m->trailer); for (auto const& og: to_process) { - QPDFObjectHandle obj = QPDFObjectHandle::Factory::newIndirect(this, og); + auto obj = getObjectByObjGen(og); if (obj.isDictionary() || obj.isArray()) { queue.push_back(obj); } else if (obj.isStream()) { @@ -1463,7 +1463,7 @@ QPDF::getAllObjects() std::vector<QPDFObjectHandle> result; for (auto const& iter: this->m->obj_cache) { QPDFObjGen const& og = iter.first; - result.push_back(QPDFObjectHandle::Factory::newIndirect(this, og)); + result.push_back(getObjectByObjGen(og)); } return result; } diff --git a/libqpdf/QPDF_linearization.cc b/libqpdf/QPDF_linearization.cc index e988092e..e09f7b68 100644 --- a/libqpdf/QPDF_linearization.cc +++ b/libqpdf/QPDF_linearization.cc @@ -137,8 +137,7 @@ QPDF::isLinearized() return false; } - QPDFObjectHandle candidate = QPDFObjectHandle::Factory::newIndirect( - this, QPDFObjGen(lindict_obj, 0)); + auto candidate = getObjectByID(lindict_obj, 0); if (!candidate.isDictionary()) { return false; } |