summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-07-09 20:41:10 +0200
committerCarl Hetherington <cth@carlh.net>2022-07-11 12:22:11 +0200
commitb1e22dff981fb86ae04b12bb5a064e61030793a8 (patch)
treeffb112f6e3f3311d8669f6a89628bf5f0bc40f2e /src/lib
parent736d6bf3242a0ba3841cb765e97cf9fee3540460 (diff)
Use a vector rather than a list when returning from content_factory().
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/content_factory.cc5
-rw-r--r--src/lib/content_factory.h3
2 files changed, 5 insertions, 3 deletions
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<string>& notes)
* @param path File or directory.
* @return Content objects.
*/
-list<shared_ptr<Content>>
+vector<shared_ptr<Content>>
content_factory (boost::filesystem::path path)
{
- list<shared_ptr<Content>> content;
+ vector<shared_ptr<Content>> 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 <libcxml/cxml.h>
+#include <vector>
class Film;
@@ -32,4 +33,4 @@ class Content;
extern std::shared_ptr<Content> content_factory (cxml::ConstNodePtr, int, std::list<std::string> &);
-extern std::list<std::shared_ptr<Content>> content_factory (boost::filesystem::path);
+extern std::vector<std::shared_ptr<Content>> content_factory (boost::filesystem::path);