summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-12-20 14:21:13 +0100
committerCarl Hetherington <cth@carlh.net>2025-09-03 11:59:16 +0200
commitf0189cc11f08d67dfeb45b41a5b970a5856cb42d (patch)
treeef17e46cb51c8013d1faed5855b90c1eb4f24914 /src/lib/dcpomatic_time.h
parent4effe4c3dc2d4b6a700e5c20e9e0104f023bd9f9 (diff)
Use helpers for serialising times to/from XML.
Diffstat (limited to 'src/lib/dcpomatic_time.h')
-rw-r--r--src/lib/dcpomatic_time.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h
index b77c961d9..cb7b58253 100644
--- a/src/lib/dcpomatic_time.h
+++ b/src/lib/dcpomatic_time.h
@@ -294,8 +294,8 @@ public:
xmlpp::Element* add_as_node(xmlpp::Element* parent, std::string name) const {
auto child = cxml::add_child(parent, name);
- child->add_child_text(dcp::raw_convert<std::string>(_t));
- child->set_attribute("timebase", dcp::raw_convert<std::string>(HZ));
+ child->add_child_text(fmt::to_string(_t));
+ child->set_attribute("timebase", fmt::to_string(HZ));
return child;
}
@@ -306,8 +306,8 @@ public:
}
void add_as_attributes(xmlpp::Element* element) const {
- element->set_attribute("time", dcp::raw_convert<std::string>(_t));
- element->set_attribute("timebase", dcp::raw_convert<std::string>(HZ));
+ element->set_attribute("time", fmt::to_string(_t));
+ element->set_attribute("timebase", fmt::to_string(HZ));
}
static Time<S, O> delta () {