X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fscreen.cc;h=8e1e83e36697f0e802d05fafc8b1fd2605cff529;hb=39fce9acb7869c551fded172aa070d75c7a9bc50;hp=61a27f2bc46a2afe864e55acfb77f3fce7fc5af1;hpb=47e29203daec51d313ed8ab8ef759752bce18d45;p=dcpomatic.git diff --git a/src/lib/screen.cc b/src/lib/screen.cc index 61a27f2bc..8e1e83e36 100644 --- a/src/lib/screen.cc +++ b/src/lib/screen.cc @@ -23,21 +23,20 @@ #include "film.h" #include "cinema.h" #include -#include #include #include using std::string; using std::vector; using std::list; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcpomatic; Screen::Screen (cxml::ConstNodePtr node) : KDMRecipient (node) { - BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children ("TrustedDevice")) { + for (auto i: node->node_children ("TrustedDevice")) { if (boost::algorithm::starts_with(i->content(), "-----BEGIN CERTIFICATE-----")) { trusted_devices.push_back (TrustedDevice(dcp::Certificate(i->content()))); } else { @@ -50,7 +49,7 @@ void Screen::as_xml (xmlpp::Element* parent) const { KDMRecipient::as_xml (parent); - BOOST_FOREACH (TrustedDevice i, trusted_devices) { + for (auto i: trusted_devices) { parent->add_child("TrustedDevice")->add_child_text(i.as_string()); } } @@ -59,7 +58,7 @@ vector Screen::trusted_device_thumbprints () const { vector t; - BOOST_FOREACH (TrustedDevice i, trusted_devices) { + for (auto i: trusted_devices) { t.push_back (i.thumbprint()); } return t; @@ -107,6 +106,6 @@ kdm_for_screen ( name_values['e'] = end.date() + " " + end.time_of_day(true, false); name_values['i'] = kdm.cpl_id(); - return KDMWithMetadataPtr(new DCPKDMWithMetadata(name_values, cinema.get(), cinema ? cinema->emails : list(), kdm)); + return KDMWithMetadataPtr(new KDMWithMetadata(name_values, cinema.get(), cinema ? cinema->emails : list(), kdm)); }