summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/dcpdiff.cc4
-rw-r--r--tools/dcpdumpsub.cc2
-rw-r--r--tools/dcpinfo.cc9
-rw-r--r--tools/dcpkdm.cc4
-rw-r--r--tools/dcprecover.cc5
-rw-r--r--tools/dcpverify.cc2
6 files changed, 12 insertions, 14 deletions
diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc
index a9d78712..336d09a5 100644
--- a/tools/dcpdiff.cc
+++ b/tools/dcpdiff.cc
@@ -99,14 +99,14 @@ load_dcp (boost::filesystem::path path, bool ignore_missing_assets, optional<str
vector<dcp::VerificationNote> notes;
dcp->read (&notes);
filter_notes (notes, ignore_missing_assets);
- BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ for (auto i: notes) {
cerr << dcp::note_to_string(i) << "\n";
}
if (key) {
auto assets = dcp->assets ();
for (auto i: assets) {
- shared_ptr<MXF> mxf = dynamic_pointer_cast<MXF>(i);
+ auto mxf = dynamic_pointer_cast<MXF>(i);
if (mxf) {
mxf->set_key (Key (key.get ()));
}
diff --git a/tools/dcpdumpsub.cc b/tools/dcpdumpsub.cc
index 5d6668af..8117f0c6 100644
--- a/tools/dcpdumpsub.cc
+++ b/tools/dcpdumpsub.cc
@@ -115,7 +115,7 @@ main (int argc, char* argv[])
dcp::EncryptedKDM encrypted_kdm (dcp::file_to_string (kdm_file.get ()));
dcp::DecryptedKDM decrypted_kdm (encrypted_kdm, dcp::file_to_string (private_key_file.get()));
bool done = false;
- BOOST_FOREACH (dcp::DecryptedKDMKey const & i, decrypted_kdm.keys()) {
+ for (auto const& i: decrypted_kdm.keys()) {
if (i.id() == *sub.key_id()) {
sub.set_key (i.key ());
done = true;
diff --git a/tools/dcpinfo.cc b/tools/dcpinfo.cc
index 18272dcf..c8519858 100644
--- a/tools/dcpinfo.cc
+++ b/tools/dcpinfo.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -52,7 +52,6 @@
#include "compose.hpp"
#include <getopt.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <iostream>
#include <cstdlib>
@@ -384,7 +383,7 @@ main (int argc, char* argv[])
OUTPUT_DCP_PATH("DCP: %1\n", boost::filesystem::path(argv[optind]).string());
dcp::filter_notes (notes, ignore_missing_assets);
- BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ for (auto i: notes) {
cerr << "Error: " << note_to_string(i) << "\n";
}
@@ -396,11 +395,11 @@ main (int argc, char* argv[])
dcp::Time total_time;
- BOOST_FOREACH (shared_ptr<CPL> i, cpls) {
+ for (auto i: cpls) {
OUTPUT_CPL_NAME_ID(" CPL: %1 %2\n", i->annotation_text().get_value_or(""), i->id());
int R = 1;
- BOOST_FOREACH (shared_ptr<Reel> j, i->reels()) {
+ for (auto j: i->reels()) {
if (should_output(only, "picture") || should_output(only, "sound") || should_output(only, "subtitle")) {
cout << " Reel " << R << "\n";
}
diff --git a/tools/dcpkdm.cc b/tools/dcpkdm.cc
index 60fcf902..d1421ed1 100644
--- a/tools/dcpkdm.cc
+++ b/tools/dcpkdm.cc
@@ -112,7 +112,7 @@ try
cout << "Signer chain:\n";
dcp::CertificateChain signer = enc_kdm.signer_certificate_chain ();
- BOOST_FOREACH (dcp::Certificate const & i, signer.root_to_leaf()) {
+ for (auto const& i: signer.root_to_leaf()) {
cout << "\tCertificate:\n";
cout << "\t\tSubject: " << i.subject() << "\n";
cout << "\t\tSubject common name: " << i.subject_common_name() << "\n";
@@ -129,7 +129,7 @@ try
try {
dcp::DecryptedKDM dec_kdm (enc_kdm, dcp::file_to_string (private_key_file.get()));
cout << "\nKeys:";
- BOOST_FOREACH (dcp::DecryptedKDMKey i, dec_kdm.keys ()) {
+ for (auto i: dec_kdm.keys()) {
cout << "\n";
cout << "\tID: " << i.id() << "\n";
cout << "\tStandard: " << (i.standard() == dcp::Standard::SMPTE ? "SMPTE" : "Interop") << "\n";
diff --git a/tools/dcprecover.cc b/tools/dcprecover.cc
index b5790992..f9e08087 100644
--- a/tools/dcprecover.cc
+++ b/tools/dcprecover.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
@@ -39,7 +39,6 @@
#include <getopt.h>
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <iostream>
using std::cerr;
@@ -109,7 +108,7 @@ main (int argc, char* argv[])
cout << "Error:" << e.what() << "\n";
}
- BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ for (auto i: notes) {
cout << "Error: " << dcp::note_to_string(i) << "\n";
}
diff --git a/tools/dcpverify.cc b/tools/dcpverify.cc
index b3ac5f06..2ba4f5c8 100644
--- a/tools/dcpverify.cc
+++ b/tools/dcpverify.cc
@@ -142,7 +142,7 @@ main (int argc, char* argv[])
dcp::filter_notes (notes, ignore_missing_assets);
bool failed = false;
- BOOST_FOREACH (dcp::VerificationNote i, notes) {
+ for (auto i: notes) {
if (ignore_bv21_smpte && i.code() == dcp::VerificationNote::Code::INVALID_STANDARD) {
continue;
}