diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-04-12 09:57:26 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-04-12 09:57:26 +0200 |
| commit | cc019b5dc938e05705d8ff0c7f1165a885a14fd0 (patch) | |
| tree | 3c67d5a5b24f99025ac1f989c22510cfc1bc6a0b /src/lib | |
| parent | 3852f523deeb4faaa157609d995f11ccf806fa8d (diff) | |
Remove unused template method.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/config.cc | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 40a9f355f..669ea4e21 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -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 { |
