diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-08-04 20:24:16 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-08-04 20:24:16 +0200 |
| commit | 68ab8fc54f8458494af7f6b1d6d37d2abdc133bf (patch) | |
| tree | c91ac846fcbe9988ce24f165f1e58c82f6aebfb6 /src | |
| parent | ec7ce7b248188c69a99ca6fba4f56ab6d791bf58 (diff) | |
Don't bother checking the return of node_child as it can never be null
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 20 |
1 files changed, 8 insertions, 12 deletions
@@ -138,10 +138,8 @@ CPL::CPL (boost::filesystem::path file) throw XMLError ("Missing ContentVersion tag in CPL"); } auto rating_list = f.node_child ("RatingList"); - if (rating_list) { - for (auto i: rating_list->node_children("Rating")) { - _ratings.push_back (Rating(i)); - } + for (auto i: rating_list->node_children("Rating")) { + _ratings.push_back (Rating(i)); } for (auto i: f.node_child("ReelList")->node_children("Reel")) { @@ -149,14 +147,12 @@ CPL::CPL (boost::filesystem::path file) } auto reel_list = f.node_child ("ReelList"); - if (reel_list) { - auto reels = reel_list->node_children("Reel"); - if (!reels.empty()) { - auto asset_list = reels.front()->node_child("AssetList"); - auto metadata = asset_list->optional_node_child("CompositionMetadataAsset"); - if (metadata) { - read_composition_metadata_asset (metadata); - } + auto reels = reel_list->node_children("Reel"); + if (!reels.empty()) { + auto asset_list = reels.front()->node_child("AssetList"); + auto metadata = asset_list->optional_node_child("CompositionMetadataAsset"); + if (metadata) { + read_composition_metadata_asset (metadata); } } |
