From 4ccca20db0f507ad5a5d71711d5e03d3a6a2f3a2 Mon Sep 17 00:00:00 2001 From: m-holger Date: Tue, 12 Jul 2022 11:36:33 +0100 Subject: [PATCH] Remove redundant parameter from QPDF::getAllPagesInternal --- include/qpdf/QPDF.hh | 1 - libqpdf/QPDF_pages.cc | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index fcc17522..d563fe8f 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -1230,7 +1230,6 @@ class QPDF void getAllPagesInternal( QPDFObjectHandle cur_pages, - std::vector& result, std::set& visited, std::set& seen); void insertPage(QPDFObjectHandle newpage, int pos); diff --git a/libqpdf/QPDF_pages.cc b/libqpdf/QPDF_pages.cc index e1a3b2c1..7b801fdc 100644 --- a/libqpdf/QPDF_pages.cc +++ b/libqpdf/QPDF_pages.cc @@ -82,7 +82,7 @@ QPDF::getAllPages() getRoot().replaceKey("/Pages", pages); } seen.clear(); - getAllPagesInternal(pages, this->m->all_pages, visited, seen); + getAllPagesInternal(pages, visited, seen); } return this->m->all_pages; } @@ -90,7 +90,6 @@ QPDF::getAllPages() void QPDF::getAllPagesInternal( QPDFObjectHandle cur_node, - std::vector& result, std::set& visited, std::set& seen) { @@ -129,12 +128,12 @@ QPDF::getAllPagesInternal( kid = makeIndirectObject(QPDFObjectHandle(kid).shallowCopy()); kids.setArrayItem(i, kid); } - getAllPagesInternal(kid, result, visited, seen); + getAllPagesInternal(kid, visited, seen); } } else { wanted_type = "/Page"; seen.insert(this_og); - result.push_back(cur_node); + m->all_pages.push_back(cur_node); } if (!cur_node.isDictionaryOfType(wanted_type)) {