From 68ab8fc54f8458494af7f6b1d6d37d2abdc133bf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 4 Aug 2021 20:24:16 +0200 Subject: Don't bother checking the return of node_child as it can never be null --- src/cpl.cc | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/src/cpl.cc b/src/cpl.cc index 92fa7044..e52f8b34 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -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); } } -- cgit v1.2.3