summaryrefslogtreecommitdiff
path: root/src/types.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-02-09 00:29:00 +0100
committerCarl Hetherington <cth@carlh.net>2024-03-20 18:21:14 +0100
commit8f1f5db2b193fe1db7eeabda2a7b3eee03dde886 (patch)
tree7cf76203fbfc7821721ed2224a1044d4f48d0fcd /src/types.cc
parenta451df311d43ee161864bf2faa4c584a0afa8b8f (diff)
Replace xmlpp::Node::add_child with cxml::add_child.
Diffstat (limited to 'src/types.cc')
-rw-r--r--src/types.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/types.cc b/src/types.cc
index f4bf8db0..c4ba8886 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -310,9 +310,9 @@ ContentVersion::ContentVersion (string label_text_)
void
ContentVersion::as_xml (xmlpp::Element* parent) const
{
- auto cv = parent->add_child("ContentVersion");
- cv->add_child("Id")->add_child_text(id);
- cv->add_child("LabelText")->add_child_text(label_text);
+ auto cv = cxml::add_child(parent, "ContentVersion");
+ cxml::add_text_child(cv, "Id", id);
+ cxml::add_text_child(cv, "LabelText", label_text);
}
@@ -345,7 +345,7 @@ Luminance::set_value (float v)
void
Luminance::as_xml (xmlpp::Element* parent, string ns) const
{
- auto lum = parent->add_child("Luminance", ns);
+ auto lum = cxml::add_child(parent, "Luminance", ns);
lum->set_attribute("units", unit_to_string(_unit));
lum->add_child_text(raw_convert<string>(_value, 3));
}