Check _inter_size in ::has_j2k() (fixes #2086).
[dcpomatic.git] / src / lib / dkdm_recipient.cc
index b9db0615239044885bad7d12c1a705c1261f4b63..30c3075691d4baa1a81130ade548227d63c84e35 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "dkdm_recipient.h"
 #include "kdm_with_metadata.h"
 #include "film.h"
 #include <dcp/raw_convert.h>
-#include <boost/foreach.hpp>
 
 
+using std::make_shared;
+using std::shared_ptr;
 using std::string;
 using std::vector;
-using boost::shared_ptr;
 using dcp::raw_convert;
 
 
 DKDMRecipient::DKDMRecipient (cxml::ConstNodePtr node)
        : KDMRecipient (node)
 {
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Email")) {
+       for (auto i: node->node_children("Email")) {
                emails.push_back (i->content());
        }
 
@@ -48,7 +49,7 @@ DKDMRecipient::as_xml (xmlpp::Element* node) const
 {
        KDMRecipient::as_xml (node);
 
-       BOOST_FOREACH (string i, emails) {
+       for (auto i: emails) {
                node->add_child("Email")->add_child_text(i);
        }
 
@@ -73,13 +74,13 @@ kdm_for_dkdm_recipient (
        dcp::LocalTime const begin(valid_from, recipient->utc_offset_hour, recipient->utc_offset_minute);
        dcp::LocalTime const end  (valid_to,   recipient->utc_offset_hour, recipient->utc_offset_minute);
 
-       dcp::EncryptedKDM const kdm = film->make_kdm (
+       auto const kdm = film->make_kdm (
                        recipient->recipient.get(),
                        vector<string>(),
                        cpl,
                        begin,
                        end,
-                       dcp::MODIFIED_TRANSITIONAL_1,
+                       dcp::Formulation::MODIFIED_TRANSITIONAL_1,
                        true,
                        0
                        );
@@ -90,6 +91,6 @@ kdm_for_dkdm_recipient (
        name_values['e'] = end.date() + " " + end.time_of_day(true, false);
        name_values['i'] = kdm.cpl_id();
 
-       return KDMWithMetadataPtr(new KDMWithMetadata(name_values, 0, recipient->emails, kdm));
+       return make_shared<KDMWithMetadata>(name_values, nullptr, recipient->emails, kdm);
 }