diff options
author | Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> | 2019-07-03 19:34:02 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2019-07-04 02:08:47 +0200 |
commit | 8f06da75343a5e970ff7a6f275c319172e6292d0 (patch) | |
tree | 13782f4c3cdc2966cfab5e4dbd064c3ff52dbaba /libqpdf | |
parent | 4db1de97cea9dfab3f3abe43766053ba0d594610 (diff) | |
download | qpdf-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')
-rw-r--r-- | libqpdf/QPDFOutlineDocumentHelper.cc | 8 | ||||
-rw-r--r-- | libqpdf/QPDFOutlineObjectHelper.cc | 2 |
2 files changed, 5 insertions, 5 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]; diff --git a/libqpdf/QPDFOutlineObjectHelper.cc b/libqpdf/QPDFOutlineObjectHelper.cc index 6cdd182e..c06c63d8 100644 --- a/libqpdf/QPDFOutlineObjectHelper.cc +++ b/libqpdf/QPDFOutlineObjectHelper.cc @@ -45,7 +45,7 @@ QPDFOutlineObjectHelper::getParent() return this->m->parent; } -std::list<QPDFOutlineObjectHelper> +std::vector<QPDFOutlineObjectHelper> QPDFOutlineObjectHelper::getKids() { return this->m->kids; |