X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_kdm_cli.cc;h=f21772a4d2d65d0fd8b10f6f300af51b28c463dd;hb=69a7c253174091d12b0efb37f2a4ac5e61dfaa3a;hp=b9f73d357e8f38b0fdb72f865d380c3c05b8f049;hpb=1a7c50245309bb0b99001940b2203a267de942ca;p=dcpomatic.git diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc index b9f73d357..f21772a4d 100644 --- a/src/tools/dcpomatic_kdm_cli.cc +++ b/src/tools/dcpomatic_kdm_cli.cc @@ -42,10 +42,10 @@ using std::cerr; using std::list; using std::vector; using std::runtime_error; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using boost::bind; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif @@ -226,7 +226,7 @@ from_film ( try { list kdms; - BOOST_FOREACH (shared_ptr i, screens) { + for (auto i: screens) { KDMWithMetadataPtr p = kdm_for_screen (film, cpl, i, valid_from, valid_to, formulation, disable_forensic_marking_picture, disable_forensic_marking_audio); if (p) { kdms.push_back (p); @@ -248,7 +248,7 @@ from_film ( optional sub_find_dkdm (shared_ptr group, string cpl_id) { - BOOST_FOREACH (shared_ptr i, group->children()) { + for (auto i: group->children()) { shared_ptr g = dynamic_pointer_cast(i); if (g) { optional dkdm = sub_find_dkdm (g, cpl_id); @@ -300,7 +300,7 @@ kdm_from_dkdm ( dcp::LocalTime().as_string() ); - BOOST_FOREACH (dcp::DecryptedKDMKey const & j, dkdm.keys()) { + for (auto const& j: dkdm.keys()) { kdm.add_key(j); } @@ -327,7 +327,7 @@ from_dkdm ( try { list kdms; - BOOST_FOREACH (shared_ptr i, screens) { + for (auto i: screens) { if (!i->recipient) { continue; } @@ -354,7 +354,7 @@ from_dkdm ( name_values['e'] = end.date() + " " + end.time_of_day(true, false); name_values['i'] = kdm.cpl_id(); - kdms.push_back (KDMWithMetadataPtr(new DCPKDMWithMetadata(name_values, i->cinema.get(), i->cinema->emails, kdm))); + kdms.push_back (KDMWithMetadataPtr(new KDMWithMetadata(name_values, i->cinema.get(), i->cinema->emails, kdm))); } write_files (kdms, zip, output, container_name_format, filename_format, verbose); } catch (FileError& e) { @@ -375,7 +375,7 @@ dump_dkdm_group (shared_ptr group, int indent) } cout << group->name() << "\n"; } - BOOST_FOREACH (shared_ptr i, group->children()) { + for (auto i: group->children()) { shared_ptr g = dynamic_pointer_cast(i); if (g) { dump_dkdm_group (g, indent + 2); @@ -407,7 +407,7 @@ int main (int argc, char* argv[]) bool list_dkdm_cpls = false; optional duration_string; bool verbose = false; - dcp::Formulation formulation = dcp::MODIFIED_TRANSITIONAL_1; + dcp::Formulation formulation = dcp::Formulation::MODIFIED_TRANSITIONAL_1; bool disable_forensic_marking_picture = false; optional disable_forensic_marking_audio; @@ -467,13 +467,13 @@ int main (int argc, char* argv[]) break; case 'F': if (string (optarg) == "modified-transitional-1") { - formulation = dcp::MODIFIED_TRANSITIONAL_1; + formulation = dcp::Formulation::MODIFIED_TRANSITIONAL_1; } else if (string (optarg) == "multiple-modified-transitional-1") { - formulation = dcp::MULTIPLE_MODIFIED_TRANSITIONAL_1; + formulation = dcp::Formulation::MULTIPLE_MODIFIED_TRANSITIONAL_1; } else if (string (optarg) == "dci-any") { - formulation = dcp::DCI_ANY; + formulation = dcp::Formulation::DCI_ANY; } else if (string (optarg) == "dci-specific") { - formulation = dcp::DCI_SPECIFIC; + formulation = dcp::Formulation::DCI_SPECIFIC; } else { error ("unrecognised KDM formulation " + string (optarg)); } @@ -533,8 +533,8 @@ int main (int argc, char* argv[]) } if (list_cinemas) { - list > cinemas = Config::instance()->cinemas (); - for (list >::const_iterator i = cinemas.begin(); i != cinemas.end(); ++i) { + list > cinemas = Config::instance()->cinemas (); + for (list >::const_iterator i = cinemas.begin(); i != cinemas.end(); ++i) { cout << (*i)->name << " (" << Emailer::address_list ((*i)->emails) << ")\n"; } exit (EXIT_SUCCESS);