aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFOutlineDocumentHelper.cc
diff options
context:
space:
mode:
authorThorsten Schöning <6223655+ams-tschoening@users.noreply.github.com>2019-07-03 19:34:02 +0200
committerJay Berkenbilt <ejb@ql.org>2019-07-04 02:08:47 +0200
commit8f06da75343a5e970ff7a6f275c319172e6292d0 (patch)
tree13782f4c3cdc2966cfab5e4dbd064c3ff52dbaba /libqpdf/QPDFOutlineDocumentHelper.cc
parent4db1de97cea9dfab3f3abe43766053ba0d594610 (diff)
downloadqpdf-8f06da75343a5e970ff7a6f275c319172e6292d0.tar.zst
Change list to vector for outline helpers (fixes #297)
This change works around STL problems with Embarcadero C++ Builder version 10.2, but std::vector is more common than std::list in qpdf, and this is a relatively new API, so an API change is tolerable. Thanks to Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> for the fix.
Diffstat (limited to 'libqpdf/QPDFOutlineDocumentHelper.cc')
-rw-r--r--libqpdf/QPDFOutlineDocumentHelper.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/QPDFOutlineDocumentHelper.cc b/libqpdf/QPDFOutlineDocumentHelper.cc
index 411ccf34..b736ff08 100644
--- a/libqpdf/QPDFOutlineDocumentHelper.cc
+++ b/libqpdf/QPDFOutlineDocumentHelper.cc
@@ -42,7 +42,7 @@ QPDFOutlineDocumentHelper::hasOutlines()
return ! this->m->outlines.empty();
}
-std::list<QPDFOutlineObjectHelper>
+std::vector<QPDFOutlineObjectHelper>
QPDFOutlineDocumentHelper::getTopLevelOutlines()
{
return this->m->outlines;
@@ -59,19 +59,19 @@ QPDFOutlineDocumentHelper::initializeByPage()
QPDFOutlineObjectHelper oh = queue.front();
queue.pop_front();
this->m->by_page[oh.getDestPage().getObjGen()].push_back(oh);
- std::list<QPDFOutlineObjectHelper> kids = oh.getKids();
+ std::vector<QPDFOutlineObjectHelper> kids = oh.getKids();
queue.insert(queue.end(), kids.begin(), kids.end());
}
}
-std::list<QPDFOutlineObjectHelper>
+std::vector<QPDFOutlineObjectHelper>
QPDFOutlineDocumentHelper::getOutlinesForPage(QPDFObjGen const& og)
{
if (this->m->by_page.empty())
{
initializeByPage();
}
- std::list<QPDFOutlineObjectHelper> result;
+ std::vector<QPDFOutlineObjectHelper> result;
if (this->m->by_page.count(og))
{
result = this->m->by_page[og];