diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-02-09 00:29:00 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-20 18:21:14 +0100 |
| commit | 8f1f5db2b193fe1db7eeabda2a7b3eee03dde886 (patch) | |
| tree | 7cf76203fbfc7821721ed2224a1044d4f48d0fcd /src/reel_picture_asset.cc | |
| parent | a451df311d43ee161864bf2faa4c584a0afa8b8f (diff) | |
Replace xmlpp::Node::add_child with cxml::add_child.
Diffstat (limited to 'src/reel_picture_asset.cc')
| -rw-r--r-- | src/reel_picture_asset.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index eb87d039..7ee5fa38 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -86,12 +86,12 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node) } -xmlpp::Node* -ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const +xmlpp::Element* +ReelPictureAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const { auto asset = ReelFileAsset::write_to_cpl (node, standard); - asset->add_child("FrameRate")->add_child_text(String::compose("%1 %2", _frame_rate.numerator, _frame_rate.denominator)); + cxml::add_text_child(asset, "FrameRate", String::compose("%1 %2", _frame_rate.numerator, _frame_rate.denominator)); if (standard == Standard::INTEROP) { @@ -113,10 +113,12 @@ ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const } } - asset->add_child("ScreenAspectRatio")->add_child_text(raw_convert<string>(closest.get(), 2, true)); + cxml::add_text_child(asset, "ScreenAspectRatio", raw_convert<string>(closest.get(), 2, true)); } else { - asset->add_child("ScreenAspectRatio")->add_child_text( - String::compose ("%1 %2", _screen_aspect_ratio.numerator, _screen_aspect_ratio.denominator) + cxml::add_text_child( + asset, + "ScreenAspectRatio", + String::compose("%1 %2", _screen_aspect_ratio.numerator, _screen_aspect_ratio.denominator) ); } |
