From ab09ee044d9342a9b294dff79469e89abd61748e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 17 Sep 2023 01:34:49 +0200 Subject: list -> vector in Config::templates(). --- src/lib/config.cc | 5 +++-- src/lib/config.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/config.cc b/src/lib/config.cc index 9bb7fccf7..44aa51dc5 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -1393,20 +1393,21 @@ Config::save_template (shared_ptr film, string name) const } -list +vector Config::templates () const { if (!boost::filesystem::exists(read_path("templates"))) { return {}; } - list n; + vector n; for (auto const& i: boost::filesystem::directory_iterator(read_path("templates"))) { n.push_back (i.path().filename().string()); } return n; } + bool Config::existing_template (string name) const { diff --git a/src/lib/config.h b/src/lib/config.h index 0a332bcbb..6d8b5ae46 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -1238,7 +1238,7 @@ public: void save_template (std::shared_ptr film, std::string name) const; bool existing_template (std::string name) const; - std::list templates () const; + std::vector templates() const; boost::filesystem::path template_read_path (std::string name) const; boost::filesystem::path template_write_path (std::string name) const; void rename_template (std::string old_name, std::string new_name) const; -- cgit v1.2.3