From 6d95d9689831a74fade32038a808f206c03d8aa2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 6 Feb 2024 10:58:39 +0100 Subject: FIXME: Remove all use of add_child() from xmlpp. Needs bump of libcxml. --- src/lib/cross_common.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/cross_common.cc') diff --git a/src/lib/cross_common.cc b/src/lib/cross_common.cc index b4d322096..711c3c540 100644 --- a/src/lib/cross_common.cc +++ b/src/lib/cross_common.cc @@ -62,16 +62,16 @@ Drive::as_xml () const { xmlpp::Document doc; auto root = doc.create_root_node ("Drive"); - root->add_child("Device")->add_child_text(_device); + cxml::add_text_child(root, "Device", _device); for (auto i: _mount_points) { - root->add_child("MountPoint")->add_child_text(i.string()); + cxml::add_text_child(root, "MountPoint", i.string()); } - root->add_child("Size")->add_child_text(dcp::raw_convert(_size)); + cxml::add_text_child(root, "Size", dcp::raw_convert(_size)); if (_vendor) { - root->add_child("Vendor")->add_child_text(*_vendor); + cxml::add_text_child(root, "Vendor", *_vendor); } if (_model) { - root->add_child("Model")->add_child_text(*_model); + cxml::add_text_child(root, "Model", *_model); } return doc.write_to_string("UTF-8"); -- cgit v1.2.3