aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFOutlineDocumentHelper.cc
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2023-01-05 13:20:37 +0100
committerm-holger <m-holger@kubitscheck.org>2023-05-19 17:58:08 +0200
commit55abecc42dc44d1b93337afe9628fea029a85696 (patch)
tree9a8b326d017431154568666c8b4684112231addf /libqpdf/QPDFOutlineDocumentHelper.cc
parent0e81ffa7b69a97ddbc04eb7b2bbc17433bfd3cb2 (diff)
downloadqpdf-55abecc42dc44d1b93337afe9628fea029a85696.tar.zst
Use QPDFObjGen::set in QPDFOutlineDocumentHelper
Diffstat (limited to 'libqpdf/QPDFOutlineDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFOutlineDocumentHelper.cc19
1 files changed, 2 insertions, 17 deletions
diff --git a/libqpdf/QPDFOutlineDocumentHelper.cc b/libqpdf/QPDFOutlineDocumentHelper.cc
index 5b2f71f6..e3485bfd 100644
--- a/libqpdf/QPDFOutlineDocumentHelper.cc
+++ b/libqpdf/QPDFOutlineDocumentHelper.cc
@@ -15,13 +15,8 @@ QPDFOutlineDocumentHelper::QPDFOutlineDocumentHelper(QPDF& qpdf) :
return;
}
QPDFObjectHandle cur = outlines.getKey("/First");
- std::set<QPDFObjGen> seen;
- while (!cur.isNull()) {
- auto og = cur.getObjGen();
- if (seen.count(og)) {
- break;
- }
- seen.insert(og);
+ QPDFObjGen::set seen;
+ while (!cur.isNull() && seen.add(cur)) {
this->m->outlines.push_back(
QPDFOutlineObjectHelper::Accessor::create(cur, *this, 1));
cur = cur.getKey("/Next");
@@ -104,13 +99,3 @@ QPDFOutlineDocumentHelper::resolveNamedDest(QPDFObjectHandle name)
}
return result;
}
-
-bool
-QPDFOutlineDocumentHelper::checkSeen(QPDFObjGen const& og)
-{
- if (this->m->seen.count(og) > 0) {
- return true;
- }
- this->m->seen.insert(og);
- return false;
-}