From 0f9dc78d7da4f96dbbfbd692c19f74de72098351 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 22 Jan 2023 20:33:34 +0100 Subject: Cleanup: swap a list for a vector. --- src/lib/text_content.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib/text_content.cc') 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 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> +vector> TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version, list& notes) { if (version < 34) { @@ -104,14 +104,15 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version, li return { make_shared(parent, node, version, notes) }; } - list> c; + vector> content; for (auto i: node->node_children("Text")) { - c.push_back (make_shared(parent, i, version, notes)); + content.push_back(make_shared(parent, i, version, notes)); } - return c; + return content; } + TextContent::TextContent (Content* parent, cxml::ConstNodePtr node, int version, list& notes) : ContentPart (parent) , _use (false) -- cgit v1.2.3