2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +00:00

Remove redundant parameter from QPDF::getAllPagesInternal

This commit is contained in:
m-holger 2022-07-12 11:36:33 +01:00
parent a9c0b02668
commit 4ccca20db0
2 changed files with 3 additions and 5 deletions

View File

@ -1230,7 +1230,6 @@ class QPDF
void getAllPagesInternal(
QPDFObjectHandle cur_pages,
std::vector<QPDFObjectHandle>& result,
std::set<QPDFObjGen>& visited,
std::set<QPDFObjGen>& seen);
void insertPage(QPDFObjectHandle newpage, int pos);

View File

@ -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<QPDFObjectHandle>& result,
std::set<QPDFObjGen>& visited,
std::set<QPDFObjGen>& 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)) {