diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-11 00:16:40 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-17 20:13:23 +0100 |
| commit | d95eacd3851a20e52202465ec22b4f72a4983dc8 (patch) | |
| tree | 1dfc1092ae7d2e6b6b7c313ad808415f578d9712 /src/subtitle_asset.h | |
| parent | cbee0d077e698541afcea82a95bafcea5245ab89 (diff) | |
Replace std::list with std::vector in the API.
Diffstat (limited to 'src/subtitle_asset.h')
| -rw-r--r-- | src/subtitle_asset.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h index dff31cc6..60ddc357 100644 --- a/src/subtitle_asset.h +++ b/src/subtitle_asset.h @@ -88,8 +88,8 @@ public: NoteHandler note ) const; - std::list<std::shared_ptr<Subtitle> > subtitles_during (Time from, Time to, bool starting) const; - std::list<std::shared_ptr<Subtitle> > const & subtitles () const { + std::vector<std::shared_ptr<Subtitle>> subtitles_during (Time from, Time to, bool starting) const; + std::vector<std::shared_ptr<Subtitle>> const & subtitles () const { return _subtitles; } @@ -105,7 +105,7 @@ public: void fix_empty_font_ids (); - virtual std::list<std::shared_ptr<LoadFontNode> > load_font_nodes () const = 0; + virtual std::vector<std::shared_ptr<LoadFontNode>> load_font_nodes () const = 0; std::string raw_xml () const { return _raw_xml; @@ -141,7 +141,7 @@ protected: boost::optional<Type> type; }; - void parse_subtitles (xmlpp::Element const * node, std::list<ParseState>& state, boost::optional<int> tcr, Standard standard); + void parse_subtitles (xmlpp::Element const * node, std::vector<ParseState>& state, boost::optional<int> tcr, Standard standard); ParseState font_node_state (xmlpp::Element const * node, Standard standard) const; ParseState text_node_state (xmlpp::Element const * node) const; ParseState image_node_state (xmlpp::Element const * node) const; @@ -152,7 +152,7 @@ protected: void subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Standard standard) const; /** All our subtitles, in no particular order */ - std::list<std::shared_ptr<Subtitle> > _subtitles; + std::vector<std::shared_ptr<Subtitle>> _subtitles; class Font { @@ -178,7 +178,7 @@ protected: }; /** TTF font data that we need */ - std::list<Font> _fonts; + std::vector<Font> _fonts; /** The raw XML data that we read from our asset; useful for validation */ std::string _raw_xml; @@ -188,7 +188,7 @@ private: friend struct ::pull_fonts_test2; friend struct ::pull_fonts_test3; - void maybe_add_subtitle (std::string text, std::list<ParseState> const & parse_state, Standard standard); + void maybe_add_subtitle (std::string text, std::vector<ParseState> const & parse_state, Standard standard); static void pull_fonts (std::shared_ptr<order::Part> part); }; |
