From 8f06da75343a5e970ff7a6f275c319172e6292d0 Mon Sep 17 00:00:00 2001 From: Thorsten Schöning <6223655+ams-tschoening@users.noreply.github.com> Date: Wed, 3 Jul 2019 19:34:02 +0200 Subject: Change list to vector for outline helpers (fixes #297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- examples/pdf-bookmarks.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/pdf-bookmarks.cc') diff --git a/examples/pdf-bookmarks.cc b/examples/pdf-bookmarks.cc index 807fc02f..20a93078 100644 --- a/examples/pdf-bookmarks.cc +++ b/examples/pdf-bookmarks.cc @@ -135,16 +135,16 @@ void show_bookmark_details(QPDFOutlineObjectHelper outline, std::cout << outline.getTitle() << std::endl; } -void extract_bookmarks(std::list outlines, +void extract_bookmarks(std::vector outlines, std::vector& numbers) { numbers.push_back(0); - for (std::list::iterator iter = outlines.begin(); + for (std::vector::iterator iter = outlines.begin(); iter != outlines.end(); ++iter) { ++(numbers.back()); show_bookmark_details(*iter, numbers); - std::list::iterator next = iter; + std::vector::iterator next = iter; ++next; bool has_next = (next != outlines.end()); if ((style == st_lines) && (! has_next)) -- cgit v1.2.3-54-g00ecf