From d9b957d7da123e4b6e5f2449f5d45c12fce225f8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 2 Sep 2022 22:43:19 +0200 Subject: Replace ContentKind enum with a class. --- src/cpl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/cpl.cc') diff --git a/src/cpl.cc b/src/cpl.cc index 1c449f8f..5e0ca2cc 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -122,7 +122,7 @@ CPL::CPL (boost::filesystem::path file) _creator = f.optional_string_child("Creator").get_value_or(""); _issue_date = f.string_child ("IssueDate"); _content_title_text = f.string_child ("ContentTitleText"); - _content_kind = content_kind_from_string (f.string_child ("ContentKind")); + _content_kind = ContentKind::from_name(f.string_child("ContentKind")); shared_ptr content_version = f.optional_node_child ("ContentVersion"); if (content_version) { /* XXX: SMPTE should insist that Id is present */ @@ -198,7 +198,7 @@ CPL::write_xml (boost::filesystem::path file, shared_ptr root->add_child("Issuer")->add_child_text (_issuer); root->add_child("Creator")->add_child_text (_creator); root->add_child("ContentTitleText")->add_child_text (_content_title_text); - root->add_child("ContentKind")->add_child_text (content_kind_to_string (_content_kind)); + root->add_child("ContentKind")->add_child_text(_content_kind.name()); if (_content_versions.empty()) { ContentVersion cv; cv.as_xml (root); -- cgit v1.2.3