From b1e22dff981fb86ae04b12bb5a064e61030793a8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 9 Jul 2022 20:41:10 +0200 Subject: Use a vector rather than a list when returning from content_factory(). --- src/lib/content_factory.cc | 5 +++-- src/lib/content_factory.h | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index 7bcc45503..135f3fe5f 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -50,6 +50,7 @@ using std::list; using std::make_shared; using std::shared_ptr; using std::string; +using std::vector; /** Create a Content object from an XML node. @@ -104,10 +105,10 @@ content_factory (cxml::ConstNodePtr node, int version, list& notes) * @param path File or directory. * @return Content objects. */ -list> +vector> content_factory (boost::filesystem::path path) { - list> content; + vector> content; if (boost::filesystem::is_directory (path)) { diff --git a/src/lib/content_factory.h b/src/lib/content_factory.h index 7da5435d5..2cef84034 100644 --- a/src/lib/content_factory.h +++ b/src/lib/content_factory.h @@ -25,6 +25,7 @@ #include +#include class Film; @@ -32,4 +33,4 @@ class Content; extern std::shared_ptr content_factory (cxml::ConstNodePtr, int, std::list &); -extern std::list> content_factory (boost::filesystem::path); +extern std::vector> content_factory (boost::filesystem::path); -- cgit v1.2.3