Use std::vector for Config::templates().
authorCarl Hetherington <cth@carlh.net>
Thu, 9 May 2024 19:33:19 +0000 (21:33 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 24 May 2024 23:30:31 +0000 (01:30 +0200)
src/lib/config.cc
src/lib/config.h

index 374605521a7d48ca04860360596e7ca04bb8cd60..879c29279da456ae664a623db014c49f965a7d07 100644 (file)
@@ -1391,14 +1391,14 @@ Config::save_template (shared_ptr<const Film> film, string name) const
 }
 
 
-list<string>
+vector<string>
 Config::templates () const
 {
        if (!dcp::filesystem::exists(read_path("templates"))) {
                return {};
        }
 
-       list<string> n;
+       vector<string> n;
        for (auto const& i: dcp::filesystem::directory_iterator(read_path("templates"))) {
                n.push_back (i.path().filename().string());
        }
index b62c38116602e4d653032e36b8cc0c10357c4907..1a59f4badfa776848f8481182da348c4ba4abb84 100644 (file)
@@ -1270,7 +1270,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;
        void rename_template (std::string old_name, std::string new_name) const;
        void delete_template (std::string name) const;