diff options
author | m-holger <m-holger@kubitscheck.org> | 2022-05-21 16:18:15 +0200 |
---|---|---|
committer | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-05-21 22:06:29 +0200 |
commit | 6c69a747b9f7a801be2ad58985f35886bd38239e (patch) | |
tree | a35f002d4564ad1811044335c34f1b510a6774b8 /libqpdf/QPDFPageDocumentHelper.cc | |
parent | 70ccd807c45f477d6caf73b9390ba3acda53d1db (diff) | |
download | qpdf-6c69a747b9f7a801be2ad58985f35886bd38239e.tar.zst |
Code clean up: use range-style for loops wherever possible
Remove variables obsoleted by commit 4f24617.
Diffstat (limited to 'libqpdf/QPDFPageDocumentHelper.cc')
-rw-r--r-- | libqpdf/QPDFPageDocumentHelper.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/libqpdf/QPDFPageDocumentHelper.cc b/libqpdf/QPDFPageDocumentHelper.cc index f54ad843..021b4369 100644 --- a/libqpdf/QPDFPageDocumentHelper.cc +++ b/libqpdf/QPDFPageDocumentHelper.cc @@ -12,9 +12,8 @@ QPDFPageDocumentHelper::QPDFPageDocumentHelper(QPDF& qpdf) : std::vector<QPDFPageObjectHelper> QPDFPageDocumentHelper::getAllPages() { - std::vector<QPDFObjectHandle> const& pages_v = this->qpdf.getAllPages(); std::vector<QPDFPageObjectHelper> pages; - for (auto const& iter: pages_v) { + for (auto const& iter: this->qpdf.getAllPages()) { pages.push_back(QPDFPageObjectHelper(iter)); } return pages; @@ -29,8 +28,7 @@ QPDFPageDocumentHelper::pushInheritedAttributesToPage() void QPDFPageDocumentHelper::removeUnreferencedResources() { - std::vector<QPDFPageObjectHelper> pages = getAllPages(); - for (auto& ph: pages) { + for (auto& ph: getAllPages()) { ph.removeUnreferencedResources(); } } @@ -66,8 +64,7 @@ QPDFPageDocumentHelper::flattenAnnotations( .warnIfPossible("document does not have updated appearance streams," " so form fields will not be flattened"); } - std::vector<QPDFPageObjectHelper> pages = getAllPages(); - for (auto& ph: pages) { + for (auto& ph: getAllPages()) { QPDFObjectHandle resources = ph.getAttribute("/Resources", true); if (!resources.isDictionary()) { // This should never happen and is not exercised in the |