list -> vector in Config::templates().
authorCarl Hetherington <cth@carlh.net>
Sat, 16 Sep 2023 23:34:49 +0000 (01:34 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 16 Sep 2023 23:34:49 +0000 (01:34 +0200)
src/lib/config.cc
src/lib/config.h

index 9bb7fccf7e3b78677df6909d2d43cfa1d4c9074b..44aa51dc5ec8b66c76beb2d35ee7cc517bc4bd12 100644 (file)
@@ -1393,20 +1393,21 @@ Config::save_template (shared_ptr<const Film> film, string name) const
 }
 
 
-list<string>
+vector<string>
 Config::templates () const
 {
        if (!boost::filesystem::exists(read_path("templates"))) {
                return {};
        }
 
-       list<string> n;
+       vector<string> 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
 {
index 0a332bcbb74abdc287153077a86601fe4d1cf00e..6d8b5ae46a46263e18dddefa32ec37f5548f3a0b 100644 (file)
@@ -1238,7 +1238,7 @@ public:
 
        void save_template (std::shared_ptr<const Film> film, std::string name) const;
        bool existing_template (std::string name) const;
-       std::list<std::string> templates () const;
+       std::vector<std::string> 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;