X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_examiner.cc;h=af9e38873f83688c989e55ab226f4ad9cb326e99;hb=6e09a576c0f1e36d442c40e1d3ddb6c29df8b7ea;hp=0cfe499a3234b982063e7617c4fe98405140c6d0;hpb=dbf2fbd90051f646ed827505ed1523f9449373f5;p=dcpomatic.git diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc index 0cfe499a3..af9e38873 100644 --- a/src/lib/dcp_examiner.cc +++ b/src/lib/dcp_examiner.cc @@ -65,10 +65,6 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) { shared_ptr cpl; - for (int i = 0; i < static_cast(TextType::COUNT); ++i) { - _text_count[i] = 0; - } - auto cpls = dcp::find_and_resolve_cpls (content->directories(), tolerant); if (content->cpl ()) { @@ -204,7 +200,7 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) LOG_GENERAL ("Main subtitle %1 of reel %2 found", i->main_subtitle()->id(), i->id()); - _text_count[static_cast(TextType::OPEN_SUBTITLE)] = 1; + _text_count[TextType::OPEN_SUBTITLE] = 1; _open_subtitle_language = try_to_parse_language (i->main_subtitle()->language()); for (auto const& font: i->main_subtitle()->asset()->font_data()) { @@ -222,7 +218,7 @@ DCPExaminer::DCPExaminer (shared_ptr content, bool tolerant) LOG_GENERAL ("Closed caption %1 of reel %2 found", j->id(), i->id()); - _text_count[static_cast(TextType::CLOSED_CAPTION)]++; + _text_count[TextType::CLOSED_CAPTION]++; _dcp_text_tracks.push_back (DCPTextTrack(j->annotation_text().get_value_or(""), try_to_parse_language(j->language()))); }