diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-10-16 22:08:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-18 08:44:00 +0200 |
commit | a05bb7bf718caf2405c5bfaa4a90f6468f2d66ff (patch) | |
tree | 741ffef245d470b9acf38bb816fe0da7a3cf1f89 /hwpfilter/source/hbox.h | |
parent | ebfdb9a15a2228ca85213d7d8e478f92953a54e2 (diff) |
Replace some lists by vectors in hwpfilter
+ simplify some parts
Change-Id: I340d6b6d17f591a58c405965367c15be674103d0
Reviewed-on: https://gerrit.libreoffice.org/43439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'hwpfilter/source/hbox.h')
-rw-r--r-- | hwpfilter/source/hbox.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h index 6d3d3f62d051..e95698943f8c 100644 --- a/hwpfilter/source/hbox.h +++ b/hwpfilter/source/hbox.h @@ -363,12 +363,12 @@ struct TxtBox: public FBox /** * Paragraph list */ - std::vector<std::list<HWPPara*>> plists; + std::vector<std::vector<HWPPara*>> plists; /** * Caption */ - std::list<HWPPara*> caption; + std::vector<HWPPara*> caption; TxtBox(); virtual ~TxtBox() override; @@ -511,14 +511,13 @@ struct Table { Table() : box(nullptr) {}; ~Table() { - std::list<TCell*>::iterator it = cells.begin(); - for( ; it != cells.end(); ++it) - delete *it; + for (auto const& cell : cells) + delete cell; }; Columns columns; Rows rows; - std::list<TCell*> cells; + std::vector<TCell*> cells; TxtBox *box; }; @@ -626,7 +625,7 @@ struct Picture: public FBox PicDef picinfo; char reserved3[9]; - std::list<HWPPara*> caption; + std::vector<HWPPara*> caption; /** * It's for the Drawing object */ @@ -669,7 +668,7 @@ struct Hidden: public HBox hchar dummy; unsigned char info[8]; // h, next, dummy - std::list<HWPPara*> plist; + std::vector<HWPPara*> plist; Hidden(); virtual ~Hidden() override; @@ -698,7 +697,7 @@ struct HeaderFooter: public HBox /** * Paragraph list of header or footer */ - std::list<HWPPara*> plist; + std::vector<HWPPara*> plist; HeaderFooter(); virtual ~HeaderFooter() override; @@ -731,7 +730,7 @@ struct Footnote: public HBox /** * Paragraph list of Footnote objects */ - std::list<HWPPara*> plist; + std::vector<HWPPara*> plist; Footnote(); virtual ~Footnote() override; |