diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-06 10:58:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-02-22 22:46:02 +0100 |
| commit | 6d95d9689831a74fade32038a808f206c03d8aa2 (patch) | |
| tree | b2d8fb562fd0da399f7d259fc82c1760b22a9402 /src/lib/cross_common.cc | |
| parent | 3ffd0163026be24e5373e0674c3301ed37546e44 (diff) | |
FIXME: Remove all use of add_child() from xmlpp.no-add-child
Needs bump of libcxml.
Diffstat (limited to 'src/lib/cross_common.cc')
| -rw-r--r-- | src/lib/cross_common.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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<string>(_size)); + cxml::add_text_child(root, "Size", dcp::raw_convert<string>(_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"); |
