From 8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 31 Jan 2021 03:14:24 +0100 Subject: More enum class additions. --- src/lib/subtitle_encoder.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/lib/subtitle_encoder.cc') diff --git a/src/lib/subtitle_encoder.cc b/src/lib/subtitle_encoder.cc index cc42f1204..3721ee02b 100644 --- a/src/lib/subtitle_encoder.cc +++ b/src/lib/subtitle_encoder.cc @@ -31,11 +31,12 @@ #include "i18n.h" -using std::string; using std::make_pair; +using std::make_shared; using std::pair; -using std::vector; using std::shared_ptr; +using std::string; +using std::vector; using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; @@ -128,7 +129,7 @@ SubtitleEncoder::go () void SubtitleEncoder::text (PlayerText subs, TextType type, optional track, dcpomatic::DCPTimePeriod period) { - if (type != TEXT_OPEN_SUBTITLE) { + if (type != TextType::OPEN_SUBTITLE) { return; } @@ -136,7 +137,7 @@ SubtitleEncoder::text (PlayerText subs, TextType type, optional tr shared_ptr asset; vector lang = _film->subtitle_languages (); if (_film->interop ()) { - shared_ptr s (new dcp::InteropSubtitleAsset()); + auto s = make_shared(); s->set_movie_title (_film->name()); if (!lang.empty()) { s->set_language (lang.front().to_string()); @@ -144,7 +145,7 @@ SubtitleEncoder::text (PlayerText subs, TextType type, optional tr s->set_reel_number (raw_convert(_reel_index + 1)); _assets[_reel_index].first = s; } else { - shared_ptr s (new dcp::SMPTESubtitleAsset()); + auto s = make_shared(); s->set_content_title_text (_film->name()); if (!lang.empty()) { s->set_language (lang.front()); -- cgit v1.2.3