diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-06 10:58:39 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-20 18:25:09 +0100 |
| commit | 0e5013e1a96af81e4b501ff0c3192c10a061a2c8 (patch) | |
| tree | 49acd96a9e6c70919a6d2c40fc14688ac6319e1b /src/lib/cross_common.cc | |
| parent | 45fc375d656e99218ca8ec3281aa2605e148b521 (diff) | |
Remove all use of add_child() from xmlpp.
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 b8f1d48f1..1e145c8fc 100644 --- a/src/lib/cross_common.cc +++ b/src/lib/cross_common.cc @@ -59,16 +59,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"); |
