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 /include | |
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 'include')
-rw-r--r-- | include/qpdf/QPDFOutlineDocumentHelper.hh | 10 | ||||
-rw-r--r-- | include/qpdf/QPDFOutlineObjectHelper.hh | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/qpdf/QPDFOutlineDocumentHelper.hh b/include/qpdf/QPDFOutlineDocumentHelper.hh index f1920574..45798a47 100644 --- a/include/qpdf/QPDFOutlineDocumentHelper.hh +++ b/include/qpdf/QPDFOutlineDocumentHelper.hh @@ -28,8 +28,8 @@ #include <qpdf/QPDF.hh> #include <map> -#include <list> #include <set> +#include <vector> #include <qpdf/DLL.h> @@ -51,7 +51,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper bool hasOutlines(); QPDF_DLL - std::list<QPDFOutlineObjectHelper> getTopLevelOutlines(); + std::vector<QPDFOutlineObjectHelper> getTopLevelOutlines(); // If the name is a name object, look it up in the /Dests key of // the document catalog. If the name is a string, look it up in @@ -64,7 +64,7 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper // Return a list outlines that are known to target the specified // page QPDF_DLL - std::list<QPDFOutlineObjectHelper> getOutlinesForPage(QPDFObjGen const&); + std::vector<QPDFOutlineObjectHelper> getOutlinesForPage(QPDFObjGen const&); class Accessor { @@ -95,11 +95,11 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper Members(); Members(Members const&); - std::list<QPDFOutlineObjectHelper> outlines; + std::vector<QPDFOutlineObjectHelper> outlines; std::set<QPDFObjGen> seen; QPDFObjectHandle dest_dict; PointerHolder<QPDFNameTreeObjectHelper> names_dest; - std::map<QPDFObjGen, std::list<QPDFOutlineObjectHelper> > by_page; + std::map<QPDFObjGen, std::vector<QPDFOutlineObjectHelper> > by_page; }; PointerHolder<Members> m; diff --git a/include/qpdf/QPDFOutlineObjectHelper.hh b/include/qpdf/QPDFOutlineObjectHelper.hh index 9063b86f..a97cf126 100644 --- a/include/qpdf/QPDFOutlineObjectHelper.hh +++ b/include/qpdf/QPDFOutlineObjectHelper.hh @@ -24,7 +24,7 @@ #include <qpdf/QPDFObjectHelper.hh> #include <qpdf/QPDFObjGen.hh> -#include <list> +#include <vector> class QPDFOutlineDocumentHelper; @@ -55,7 +55,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper // Return children as a list. QPDF_DLL - std::list<QPDFOutlineObjectHelper> getKids(); + std::vector<QPDFOutlineObjectHelper> getKids(); // Return the destination, regardless of whether it is named or // explicit and whether it is directly provided or in a GoTo @@ -113,7 +113,7 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper QPDFOutlineDocumentHelper& dh; PointerHolder<QPDFOutlineObjectHelper> parent; - std::list<QPDFOutlineObjectHelper> kids; + std::vector<QPDFOutlineObjectHelper> kids; }; PointerHolder<Members> m; |