Remove unused template method.
authorCarl Hetherington <cth@carlh.net>
Sat, 12 Apr 2025 07:57:26 +0000 (09:57 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 12 Apr 2025 07:57:26 +0000 (09:57 +0200)
src/lib/config.cc

index 40a9f355f092776bec25b3c1e80204cf98d97e6f..669ea4e21a2957d1a188462f76d5a46a735b362f 100644 (file)
@@ -1183,30 +1183,6 @@ Config::write_config() const
 }
 
 
-template <class T>
-void
-write_file(string root_node, string node, string version, list<shared_ptr<T>> things, boost::filesystem::path file)
-{
-       xmlpp::Document doc;
-       auto root = doc.create_root_node(root_node);
-       cxml::add_text_child(root, "Version", version);
-
-       for (auto i: things) {
-               i->as_xml(cxml::add_child(root, node));
-       }
-
-       try {
-               doc.write_to_file_formatted(file.string() + ".tmp");
-               dcp::filesystem::remove(file);
-               dcp::filesystem::rename(file.string() + ".tmp", file);
-       } catch (xmlpp::exception& e) {
-               string s = e.what();
-               trim(s);
-               throw FileError(s, file);
-       }
-}
-
-
 boost::filesystem::path
 Config::default_directory_or(boost::filesystem::path a) const
 {