diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-22 20:33:34 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-18 00:41:34 +0100 |
| commit | 0f9dc78d7da4f96dbbfbd692c19f74de72098351 (patch) | |
| tree | c6ad4ceee12d3ed675b19e6d3a5aee55213289cd /src/lib/text_content.cc | |
| parent | 9f646cd41ced9bf6f2e6fd735f92fae3aff1d6db (diff) | |
Cleanup: swap a list for a vector.
Diffstat (limited to 'src/lib/text_content.cc')
| -rw-r--r-- | src/lib/text_content.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc index a85b271a8..e4cbc601a 100644 --- a/src/lib/text_content.cc +++ b/src/lib/text_content.cc @@ -81,9 +81,9 @@ TextContent::TextContent (Content* parent, TextType type, TextType original_type } /** @return TextContents from node or <Text> nodes under node (according to version). - * The list could be empty if no TextContents are found. + * The vector could be empty if no TextContents are found. */ -list<shared_ptr<TextContent>> +vector<shared_ptr<TextContent>> TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes) { if (version < 34) { @@ -104,14 +104,15 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version, li return { make_shared<TextContent>(parent, node, version, notes) }; } - list<shared_ptr<TextContent>> c; + vector<shared_ptr<TextContent>> content; for (auto i: node->node_children("Text")) { - c.push_back (make_shared<TextContent>(parent, i, version, notes)); + content.push_back(make_shared<TextContent>(parent, i, version, notes)); } - return c; + return content; } + TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version, list<string>& notes) : ContentPart (parent) , _use (false) |
