BOOST_FOREACH.
authorCarl Hetherington <cth@carlh.net>
Mon, 4 Jan 2021 20:32:13 +0000 (21:32 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 7 Jan 2021 22:27:56 +0000 (23:27 +0100)
157 files changed:
src/lib/active_text.cc
src/lib/analyse_audio_job.cc
src/lib/analyse_subtitles_job.cc
src/lib/audio_analysis.cc
src/lib/audio_content.cc
src/lib/audio_decoder.cc
src/lib/audio_mapping.cc
src/lib/audio_merger.cc
src/lib/audio_ring_buffers.cc
src/lib/case_insensitive_sorter.cc
src/lib/check_content_change_job.cc
src/lib/cinema.cc
src/lib/colour_conversion.cc
src/lib/config.cc
src/lib/content.cc
src/lib/cross_common.cc
src/lib/cross_linux.cc
src/lib/cross_osx.cc
src/lib/cross_windows.cc
src/lib/dcp.cc
src/lib/dcp_content.cc
src/lib/dcp_content_type.cc
src/lib/dcp_decoder.cc
src/lib/dcp_encoder.cc
src/lib/dcp_examiner.cc
src/lib/dcp_subtitle_content.cc
src/lib/dcp_subtitle_decoder.cc
src/lib/dcpomatic_time.h
src/lib/decoder.cc
src/lib/decoder_factory.cc
src/lib/dkdm_recipient.cc
src/lib/dkdm_wrapper.cc
src/lib/emailer.cc
src/lib/empty.cc
src/lib/encode_server.cc
src/lib/encode_server_finder.cc
src/lib/ext.cc
src/lib/ffmpeg.cc
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_encoder.cc
src/lib/ffmpeg_examiner.cc
src/lib/ffmpeg_file_encoder.cc
src/lib/ffmpeg_subtitle_stream.cc
src/lib/film.cc
src/lib/filter.cc
src/lib/font.cc
src/lib/frame_interval_checker.cc
src/lib/hints.cc
src/lib/image_content.cc
src/lib/image_filename_sorter.cc
src/lib/j2k_encoder.cc
src/lib/job.cc
src/lib/job_manager.cc
src/lib/kdm_with_metadata.cc
src/lib/overlaps.cc
src/lib/player.cc
src/lib/player_text.cc
src/lib/playlist.cc
src/lib/reel_writer.cc
src/lib/render_text.cc
src/lib/screen.cc
src/lib/send_kdm_email_job.cc
src/lib/send_notification_email_job.cc
src/lib/send_problem_report_job.cc
src/lib/shuffler.cc
src/lib/spl.cc
src/lib/string_text_file_decoder.cc
src/lib/subtitle_encoder.cc
src/lib/text_content.cc
src/lib/text_decoder.cc
src/lib/types.cc
src/lib/util.cc
src/lib/util.h
src/lib/verify_dcp_job.cc
src/lib/video_decoder.cc
src/lib/video_ring_buffers.cc
src/lib/writer.cc
src/tools/dcpomatic.cc
src/tools/dcpomatic_batch.cc
src/tools/dcpomatic_cli.cc
src/tools/dcpomatic_create.cc
src/tools/dcpomatic_disk.cc
src/tools/dcpomatic_disk_writer.cc
src/tools/dcpomatic_kdm.cc
src/tools/dcpomatic_kdm_cli.cc
src/tools/dcpomatic_player.cc
src/tools/dcpomatic_playlist.cc
src/tools/dcpomatic_server.cc
src/wx/audio_dialog.cc
src/wx/audio_mapping_view.cc
src/wx/audio_panel.cc
src/wx/audio_plot.cc
src/wx/cinema_dialog.cc
src/wx/closed_captions_dialog.cc
src/wx/config_dialog.cc
src/wx/config_dialog.h
src/wx/confirm_kdm_email_dialog.cc
src/wx/content_colour_conversion_dialog.cc
src/wx/content_menu.cc
src/wx/content_panel.cc
src/wx/content_properties_dialog.cc
src/wx/content_sub_panel.cc
src/wx/content_view.cc
src/wx/dcp_panel.cc
src/wx/dkdm_dialog.cc
src/wx/dkdm_output_panel.cc
src/wx/dolby_doremi_certificate_panel.cc
src/wx/download_certificate_dialog.cc
src/wx/editable_list.h
src/wx/film_editor.cc
src/wx/film_name_location_dialog.cc
src/wx/film_viewer.cc
src/wx/filter_dialog.cc
src/wx/fonts_dialog.cc
src/wx/full_config_dialog.cc
src/wx/gain_calculator_dialog.cc
src/wx/hints_dialog.cc
src/wx/job_manager_view.cc
src/wx/kdm_cpl_panel.cc
src/wx/kdm_dialog.cc
src/wx/kdm_output_panel.cc
src/wx/language_tag_dialog.cc
src/wx/move_to_dialog.cc
src/wx/nag_dialog.cc
src/wx/name_format_editor.h
src/wx/player_config_dialog.cc
src/wx/player_stress_tester.cc
src/wx/playlist_controls.cc
src/wx/qube_certificate_panel.cc
src/wx/recipients_panel.cc
src/wx/recreate_chain_dialog.cc
src/wx/save_template_dialog.cc
src/wx/screens_panel.cc
src/wx/servers_list_dialog.cc
src/wx/suspender.cc
src/wx/system_font_dialog.cc
src/wx/templates_dialog.cc
src/wx/text_panel.cc
src/wx/text_view.cc
src/wx/timeline.cc
src/wx/timeline_audio_content_view.cc
src/wx/timeline_content_view.cc
src/wx/timeline_reels_view.cc
src/wx/timing_panel.cc
src/wx/verify_dcp_dialog.cc
src/wx/video_panel.cc
src/wx/wx_util.cc
test/colour_conversion_test.cc
test/dcp_subtitle_test.cc
test/ffmpeg_encoder_test.cc
test/kdm_naming_test.cc
test/reels_test.cc
test/subtitle_reel_number_test.cc
test/subtitle_reel_test.cc
test/threed_test.cc
test/vf_test.cc

index 30f3b8c..1180ce7 100644 (file)
@@ -54,7 +54,7 @@ ActiveText::get_burnt (DCPTimePeriod period, bool always_burn_captions) const
                        continue;
                }
 
-               BOOST_FOREACH (Period j, i->second) {
+               for (auto j: i->second) {
                        DCPTimePeriod test (j.from, j.to.get_value_or(DCPTime::max()));
                        optional<DCPTimePeriod> overlap = period.overlap (test);
                        if (overlap && overlap->duration() > DCPTime(period.duration().get() / 2)) {
@@ -77,7 +77,7 @@ ActiveText::clear_before (DCPTime time)
        Map updated;
        for (Map::const_iterator i = _data.begin(); i != _data.end(); ++i) {
                list<Period> as;
-               BOOST_FOREACH (Period j, i->second) {
+               for (auto j: i->second) {
                        if (!j.to || j.to.get() >= time) {
                                as.push_back (j);
                        }
@@ -119,7 +119,7 @@ ActiveText::add_to (weak_ptr<const TextContent> content, DCPTime to)
 
        _data[content].back().to = to;
 
-       BOOST_FOREACH (StringText& i, _data[content].back().subs.string) {
+       for (auto& i: _data[content].back().subs.string) {
                i.set_out (dcp::Time(to.seconds(), 1000));
        }
 
index 0d6a5e8..c94e0b9 100644 (file)
@@ -37,7 +37,6 @@ extern "C" {
 #include <libavfilter/f_ebur128.h>
 #endif
 }
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -123,7 +122,7 @@ AnalyseAudioJob::AnalyseAudioJob (shared_ptr<const Film> film, shared_ptr<const
 AnalyseAudioJob::~AnalyseAudioJob ()
 {
        stop_thread ();
-       BOOST_FOREACH (Filter const * i, _filters) {
+       for (auto i: _filters) {
                delete const_cast<Filter*> (i);
        }
        delete[] _current;
@@ -165,7 +164,7 @@ AnalyseAudioJob::run ()
        _analysis.reset (new AudioAnalysis (_film->audio_channels ()));
 
        bool has_any_audio = false;
-       BOOST_FOREACH (shared_ptr<Content> c, _playlist->content ()) {
+       for (auto c: _playlist->content()) {
                if (c->audio) {
                        has_any_audio = true;
                }
index df3cb31..b941824 100644 (file)
@@ -94,7 +94,7 @@ AnalyseSubtitlesJob::analyse (PlayerText text, TextType type)
                return;
        }
 
-       BOOST_FOREACH (BitmapText const& i, text.bitmap) {
+       for (auto const& i: text.bitmap) {
                if (!_bounding_box) {
                        _bounding_box = i.rectangle;
                } else {
@@ -105,7 +105,7 @@ AnalyseSubtitlesJob::analyse (PlayerText text, TextType type)
        if (!text.string.empty()) {
                /* We can provide dummy values for time and frame rate here as they are only used to calculate fades */
                dcp::Size const frame = _film->frame_size();
-               BOOST_FOREACH (PositionImage i, render_text(text.string, text.fonts, frame, dcpomatic::DCPTime(), 24)) {
+               for (auto i: render_text(text.string, text.fonts, frame, dcpomatic::DCPTime(), 24)) {
                        dcpomatic::Rect<double> rect (
                                        double(i.position.x) / frame.width, double(i.position.y) / frame.height,
                                        double(i.image->size().width) / frame.width, double(i.image->size().height) / frame.height
index 41591b0..22c14c7 100644 (file)
@@ -29,7 +29,6 @@ DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <stdint.h>
 #include <cmath>
 #include <cstdio>
@@ -68,17 +67,17 @@ AudioAnalysis::AudioAnalysis (boost::filesystem::path filename)
                throw OldFormatError ("Audio analysis file is too old");
        }
 
-       BOOST_FOREACH (cxml::NodePtr i, f.node_children ("Channel")) {
+       for (auto i: f.node_children("Channel")) {
                vector<AudioPoint> channel;
 
-               BOOST_FOREACH (cxml::NodePtr j, i->node_children ("Point")) {
-                       channel.push_back (AudioPoint (j));
+               for (auto j: i->node_children("Point")) {
+                       channel.push_back (AudioPoint(j));
                }
 
                _data.push_back (channel);
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children ("SamplePeak")) {
+       for (auto i: f.node_children ("SamplePeak")) {
                _sample_peak.push_back (
                        PeakTime (
                                dcp::raw_convert<float>(i->content()), DCPTime(i->number_attribute<Frame>("Time"))
@@ -86,7 +85,7 @@ AudioAnalysis::AudioAnalysis (boost::filesystem::path filename)
                        );
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children ("TruePeak")) {
+       for (auto i: f.node_children ("TruePeak")) {
                _true_peak.push_back (dcp::raw_convert<float> (i->content ()));
        }
 
@@ -135,9 +134,9 @@ AudioAnalysis::write (boost::filesystem::path filename)
 
        root->add_child("Version")->add_child_text (raw_convert<string> (_current_state_version));
 
-       BOOST_FOREACH (vector<AudioPoint>& i, _data) {
+       for (auto& i: _data) {
                xmlpp::Element* channel = root->add_child ("Channel");
-               BOOST_FOREACH (AudioPoint& j, i) {
+               for (auto& j: i) {
                        j.as_xml (channel->add_child ("Point"));
                }
        }
@@ -148,7 +147,7 @@ AudioAnalysis::write (boost::filesystem::path filename)
                n->set_attribute ("Time", raw_convert<string> (_sample_peak[i].time.get()));
        }
 
-       BOOST_FOREACH (float i, _true_peak) {
+       for (auto i: _true_peak) {
                root->add_child("TruePeak")->add_child_text (raw_convert<string> (i));
        }
 
@@ -213,7 +212,7 @@ AudioAnalysis::overall_true_peak () const
 {
        optional<float> p;
 
-       BOOST_FOREACH (float i, _true_peak) {
+       for (auto i: _true_peak) {
                if (!p || i > *p) {
                        p = i;
                }
index 79a00b2..c70afcd 100644 (file)
@@ -27,7 +27,6 @@
 #include <dcp/raw_convert.h>
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -137,7 +136,7 @@ string
 AudioContent::technical_summary () const
 {
        string s = "audio: ";
-       BOOST_FOREACH (AudioStreamPtr i, streams ()) {
+       for (auto i: streams()) {
                s += String::compose ("stream channels %1 rate %2 ", i->channels(), i->frame_rate());
        }
 
@@ -150,7 +149,7 @@ AudioContent::set_mapping (AudioMapping mapping)
        ChangeSignaller<Content> cc (_parent, AudioContentProperty::STREAMS);
 
        int c = 0;
-       BOOST_FOREACH (AudioStreamPtr i, streams ()) {
+       for (auto i: streams()) {
                AudioMapping stream_mapping (i->channels (), MAX_DCP_AUDIO_CHANNELS);
                for (int j = 0; j < i->channels(); ++j) {
                        for (int k = 0; k < MAX_DCP_AUDIO_CHANNELS; ++k) {
@@ -166,7 +165,7 @@ AudioMapping
 AudioContent::mapping () const
 {
        int channels = 0;
-       BOOST_FOREACH (AudioStreamPtr i, streams ()) {
+       for (auto i: streams()) {
                channels += i->channels ();
        }
 
@@ -175,7 +174,7 @@ AudioContent::mapping () const
 
        int c = 0;
        int s = 0;
-       BOOST_FOREACH (AudioStreamPtr i, streams ()) {
+       for (auto i: streams()) {
                AudioMapping mapping = i->mapping ();
                for (int j = 0; j < mapping.input_channels(); ++j) {
                        for (int k = 0; k < MAX_DCP_AUDIO_CHANNELS; ++k) {
@@ -232,7 +231,7 @@ AudioContent::processing_description (shared_ptr<const Film> film) const
        bool same = true;
 
        optional<int> common_frame_rate;
-       BOOST_FOREACH (AudioStreamPtr i, streams()) {
+       for (auto i: streams()) {
                if (i->frame_rate() != resampled_frame_rate(film)) {
                        resampled = true;
                } else {
@@ -272,7 +271,7 @@ AudioContent::channel_names () const
 
        int index = 0;
        int stream = 1;
-       BOOST_FOREACH (AudioStreamPtr i, streams ()) {
+       for (auto i: streams()) {
                for (int j = 0; j < i->channels(); ++j) {
                        n.push_back (NamedChannel(String::compose ("%1:%2", stream, j + 1), index++));
                }
index 5334dfa..095be0a 100644 (file)
@@ -25,7 +25,6 @@
 #include "log.h"
 #include "resampler.h"
 #include "compose.hpp"
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -43,7 +42,7 @@ AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> cont
        , _fast (fast)
 {
        /* Set up _positions so that we have one for each stream */
-       BOOST_FOREACH (AudioStreamPtr i, content->streams ()) {
+       for (auto i: content->streams ()) {
                _positions[i] = 0;
        }
 }
@@ -184,7 +183,7 @@ AudioDecoder::flush ()
 void
 AudioDecoder::silence (int milliseconds)
 {
-       BOOST_FOREACH (AudioStreamPtr i, _content->streams ()) {
+       for (auto i: _content->streams()) {
                int const samples = ContentTime::from_seconds(milliseconds / 1000.0).frames_round(i->frame_rate());
                shared_ptr<AudioBuffers> silence (new AudioBuffers (i->channels(), samples));
                silence->make_silent ();
index 37a3d5f..da9f982 100644 (file)
@@ -237,7 +237,7 @@ AudioMapping::mapped_output_channels () const
        list<int> mapped;
 
        for (vector<vector<float> >::const_iterator i = _gain.begin(); i != _gain.end(); ++i) {
-               BOOST_FOREACH (dcp::Channel j, dcp::used_audio_channels()) {
+               for (auto j: dcp::used_audio_channels()) {
                        if (abs ((*i)[j]) > minus_96_db) {
                                mapped.push_back (j);
                        }
index 347a96f..06eba09 100644 (file)
@@ -60,7 +60,7 @@ AudioMerger::pull (DCPTime time)
        list<Buffer> new_buffers;
 
        _buffers.sort (AudioMerger::BufferComparator());
-       BOOST_FOREACH (Buffer i, _buffers) {
+       for (auto i: _buffers) {
                if (i.period().to <= time) {
                        /* Completely within the pull period */
                        DCPOMATIC_ASSERT (i.audio->frames() > 0);
@@ -102,7 +102,7 @@ AudioMerger::push (std::shared_ptr<const AudioBuffers> audio, DCPTime time)
        DCPTimePeriod period (time, time + DCPTime::from_frames (audio->frames(), _frame_rate));
 
        /* Mix any overlapping parts of this new block with existing ones */
-       BOOST_FOREACH (Buffer i, _buffers) {
+       for (auto i: _buffers) {
                optional<DCPTimePeriod> overlap = i.period().overlap (period);
                if (overlap) {
                        int32_t const offset = frames(DCPTime(overlap->from - i.time));
@@ -116,12 +116,12 @@ AudioMerger::push (std::shared_ptr<const AudioBuffers> audio, DCPTime time)
        }
 
        list<DCPTimePeriod> periods;
-       BOOST_FOREACH (Buffer i, _buffers) {
+       for (auto i: _buffers) {
                periods.push_back (i.period ());
        }
 
        /* Add the non-overlapping parts */
-       BOOST_FOREACH (DCPTimePeriod i, subtract (period, periods)) {
+       for (auto i: subtract(period, periods)) {
                list<Buffer>::iterator before = _buffers.end();
                list<Buffer>::iterator after = _buffers.end();
                for (list<Buffer>::iterator j = _buffers.begin(); j != _buffers.end(); ++j) {
index c0559f6..289045f 100644 (file)
@@ -21,7 +21,6 @@
 #include "audio_ring_buffers.h"
 #include "dcpomatic_assert.h"
 #include "exceptions.h"
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::min;
index 1dfdb01..c26f1e6 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "case_insensitive_sorter.h"
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::string;
index 45a662e..c4d050c 100644 (file)
@@ -23,7 +23,6 @@
 #include "examine_content_job.h"
 #include "content.h"
 #include "film.h"
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -66,7 +65,7 @@ CheckContentChangeJob::run ()
 
        list<shared_ptr<Content> > changed;
 
-       BOOST_FOREACH (shared_ptr<Content> i, _film->content()) {
+       for (auto i: _film->content()) {
                bool ic = false;
                for (size_t j = 0; j < i->number_of_paths(); ++j) {
                        if (boost::filesystem::last_write_time(i->path(j)) != i->last_write_time(j)) {
@@ -84,7 +83,7 @@ CheckContentChangeJob::run ()
 
        if (!changed.empty()) {
                if (_gui) {
-                       BOOST_FOREACH (shared_ptr<Content> i, changed) {
+                       for (auto i: changed) {
                                JobManager::instance()->add(shared_ptr<Job>(new ExamineContentJob(_film, i)));
                        }
                        string m = _("Some files have been changed since they were added to the project.\n\nThese files will now be re-examined, so you may need to check their settings.");
index 48cba2b..42557ef 100644 (file)
@@ -24,7 +24,6 @@
 #include <libcxml/cxml.h>
 #include <dcp/raw_convert.h>
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::list;
@@ -37,7 +36,7 @@ Cinema::Cinema (cxml::ConstNodePtr node)
        : name (node->string_child ("Name"))
        , notes (node->optional_string_child("Notes").get_value_or(""))
 {
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Email")) {
+       for (auto i: node->node_children("Email")) {
                emails.push_back (i->content ());
        }
 
@@ -67,7 +66,7 @@ Cinema::as_xml (xmlpp::Element* parent) const
 {
        parent->add_child("Name")->add_child_text (name);
 
-       BOOST_FOREACH (string i, emails) {
+       for (auto i: emails) {
                parent->add_child("Email")->add_child_text (i);
        }
 
@@ -76,7 +75,7 @@ Cinema::as_xml (xmlpp::Element* parent) const
        parent->add_child("UTCOffsetHour")->add_child_text (raw_convert<string> (_utc_offset_hour));
        parent->add_child("UTCOffsetMinute")->add_child_text (raw_convert<string> (_utc_offset_minute));
 
-       BOOST_FOREACH (shared_ptr<Screen> i, _screens) {
+       for (auto i: _screens) {
                i->as_xml (parent->add_child ("Screen"));
        }
 }
index d0e0f46..e0158b7 100644 (file)
@@ -33,7 +33,6 @@
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -293,7 +292,7 @@ PresetColourConversion::setup_colour_conversion_presets ()
 PresetColourConversion
 PresetColourConversion::from_id (string s)
 {
-       BOOST_FOREACH (PresetColourConversion const& i, _presets) {
+       for (auto const& i: _presets) {
                if (i.id == s) {
                        return i;
                }
index e242579..a3eb1b7 100644 (file)
@@ -41,7 +41,6 @@
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <boost/thread.hpp>
 #include <cstdlib>
 #include <fstream>
@@ -262,7 +261,7 @@ try
        boost::optional<bool> u = f.optional_bool_child ("UseAnyServers");
        _use_any_servers = u.get_value_or (true);
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("Server")) {
+       for (auto i: f.node_children("Server")) {
                if (i->node_children("HostName").size() == 1) {
                        _servers.push_back (i->string_child ("HostName"));
                } else {
@@ -348,7 +347,7 @@ try
 
        _kdm_subject = f.optional_string_child ("KDMSubject").get_value_or (_("KDM delivery: $CPL_NAME"));
        _kdm_from = f.string_child ("KDMFrom");
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("KDMCC")) {
+       for (auto i: f.node_children("KDMCC")) {
                if (!i->content().empty()) {
                        _kdm_cc.push_back (i->content ());
                }
@@ -359,7 +358,7 @@ try
        _notification_subject = f.optional_string_child("NotificationSubject").get_value_or(_("DCP-o-matic notification"));
        _notification_from = f.optional_string_child("NotificationFrom").get_value_or("");
        _notification_to = f.optional_string_child("NotificationTo").get_value_or("");
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("NotificationCC")) {
+       for (auto i: f.node_children("NotificationCC")) {
                if (!i->content().empty()) {
                        _notification_cc.push_back (i->content ());
                }
@@ -384,11 +383,11 @@ try
        _win32_console = f.optional_bool_child ("Win32Console").get_value_or (false);
 #endif
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("History")) {
+       for (auto i: f.node_children("History")) {
                _history.push_back (i->content ());
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("PlayerHistory")) {
+       for (auto i: f.node_children("PlayerHistory")) {
                _player_history.push_back (i->content ());
        }
 
@@ -396,7 +395,7 @@ try
        if (signer) {
                shared_ptr<dcp::CertificateChain> c (new dcp::CertificateChain ());
                /* Read the signing certificates and private key in from the config file */
-               BOOST_FOREACH (cxml::NodePtr i, signer->node_children ("Certificate")) {
+               for (auto i: signer->node_children ("Certificate")) {
                        c->add (dcp::Certificate (i->content ()));
                }
                c->set_key (signer->string_child ("PrivateKey"));
@@ -409,7 +408,7 @@ try
        cxml::NodePtr decryption = f.optional_node_child ("Decryption");
        if (decryption) {
                shared_ptr<dcp::CertificateChain> c (new dcp::CertificateChain ());
-               BOOST_FOREACH (cxml::NodePtr i, decryption->node_children ("Certificate")) {
+               for (auto i: decryption->node_children ("Certificate")) {
                        c->add (dcp::Certificate (i->content ()));
                }
                c->set_key (decryption->string_child ("PrivateKey"));
@@ -421,7 +420,7 @@ try
        /* These must be done before we call Bad as that might set one
           of the nags.
        */
-       BOOST_FOREACH (cxml::NodePtr i, f.node_children("Nagged")) {
+       for (auto i: f.node_children("Nagged")) {
                int const id = i->number_attribute<int>("Id");
                if (id >= 0 && id < NAG_COUNT) {
                        _nagged[id] = raw_convert<int>(i->content());
@@ -430,7 +429,7 @@ try
 
        optional<BadReason> bad;
 
-       BOOST_FOREACH (dcp::Certificate const & i, _signer_chain->unordered()) {
+       for (auto const& i: _signer_chain->unordered()) {
                if (i.has_utf8_strings()) {
                        bad = BAD_SIGNER_UTF8_STRINGS;
                }
@@ -465,7 +464,7 @@ try
        } else {
                /* Old-style: one or more DKDM nodes */
                _dkdms.reset (new DKDMGroup ("root"));
-               BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("DKDM")) {
+               for (auto i: f.node_children("DKDM")) {
                        _dkdms->add (DKDMBase::read (i));
                }
        }
@@ -506,7 +505,7 @@ try
        _decode_reduction = f.optional_number_child<int>("DecodeReduction");
        _default_notify = f.optional_bool_child("DefaultNotify").get_value_or(false);
 
-       BOOST_FOREACH (cxml::NodePtr i, f.node_children("Notification")) {
+       for (auto i: f.node_children("Notification")) {
                int const id = i->number_attribute<int>("Id");
                if (id >= 0 && id < NOTIFICATION_COUNT) {
                        _notification[id] = raw_convert<int>(i->content());
@@ -622,7 +621,7 @@ Config::write_config () const
        /* [XML] UseAnyServers 1 to broadcast to look for encoding servers to use, 0 to use only those configured. */
        root->add_child("UseAnyServers")->add_child_text (_use_any_servers ? "1" : "0");
 
-       BOOST_FOREACH (string i, _servers) {
+       for (auto i: _servers) {
                /* [XML:opt] Server IP address or hostname of an encoding server to use; you can use as many of these tags
                   as you like.
                */
@@ -725,7 +724,7 @@ Config::write_config () const
        root->add_child("KDMSubject")->add_child_text (_kdm_subject);
        /* [XML] KDMFrom From address to use for KDM emails. */
        root->add_child("KDMFrom")->add_child_text (_kdm_from);
-       BOOST_FOREACH (string i, _kdm_cc) {
+       for (auto i: _kdm_cc) {
                /* [XML] KDMCC CC address to use for KDM emails; you can use as many of these tags as you like. */
                root->add_child("KDMCC")->add_child_text (i);
        }
@@ -740,7 +739,7 @@ Config::write_config () const
        root->add_child("NotificationFrom")->add_child_text (_notification_from);
        /* [XML] NotificationFrom To address to use for notification emails. */
        root->add_child("NotificationTo")->add_child_text (_notification_to);
-       BOOST_FOREACH (string i, _notification_cc) {
+       for (auto i: _notification_cc) {
                /* [XML] NotificationCC CC address to use for notification emails; you can use as many of these tags as you like. */
                root->add_child("NotificationCC")->add_child_text (i);
        }
@@ -782,7 +781,7 @@ Config::write_config () const
        */
        xmlpp::Element* signer = root->add_child ("Signer");
        DCPOMATIC_ASSERT (_signer_chain);
-       BOOST_FOREACH (dcp::Certificate const & i, _signer_chain->unordered()) {
+       for (auto const& i: _signer_chain->unordered()) {
                signer->add_child("Certificate")->add_child_text (i.certificate (true));
        }
        signer->add_child("PrivateKey")->add_child_text (_signer_chain->key().get ());
@@ -790,7 +789,7 @@ Config::write_config () const
        /* [XML] Decryption Certificate chain and private key to use when decrypting KDMs */
        xmlpp::Element* decryption = root->add_child ("Decryption");
        DCPOMATIC_ASSERT (_decryption_chain);
-       BOOST_FOREACH (dcp::Certificate const & i, _decryption_chain->unordered()) {
+       for (auto const& i: _decryption_chain->unordered()) {
                decryption->add_child("Certificate")->add_child_text (i.certificate (true));
        }
        decryption->add_child("PrivateKey")->add_child_text (_decryption_chain->key().get ());
@@ -798,14 +797,14 @@ Config::write_config () const
        /* [XML] History Filename of DCP to present in the <guilabel>File</guilabel> menu of the GUI; there can be more than one
           of these tags.
        */
-       BOOST_FOREACH (boost::filesystem::path i, _history) {
+       for (auto i: _history) {
                root->add_child("History")->add_child_text (i.string ());
        }
 
        /* [XML] History Filename of DCP to present in the <guilabel>File</guilabel> menu of the player; there can be more than one
           of these tags.
        */
-       BOOST_FOREACH (boost::filesystem::path i, _player_history) {
+       for (auto i: _player_history) {
                root->add_child("PlayerHistory")->add_child_text (i.string ());
        }
 
@@ -1002,7 +1001,7 @@ write_file (string root_node, string node, string version, list<shared_ptr<T> >
        xmlpp::Element* root = doc.create_root_node (root_node);
        root->add_child("Version")->add_child_text(version);
 
-       BOOST_FOREACH (shared_ptr<T> i, things) {
+       for (auto i: things) {
                i->as_xml (root->add_child(node));
        }
 
@@ -1172,7 +1171,7 @@ Config::clean_history_internal (vector<boost::filesystem::path>& h)
 {
        vector<boost::filesystem::path> old = h;
        h.clear ();
-       BOOST_FOREACH (boost::filesystem::path i, old) {
+       for (auto i: old) {
                try {
                        if (boost::filesystem::is_directory(i)) {
                                h.push_back (i);
@@ -1194,7 +1193,7 @@ Config::read_cinemas (cxml::Document const & f)
 {
        _cinemas.clear ();
        list<cxml::NodePtr> cin = f.node_children ("Cinema");
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("Cinema")) {
+       for (auto i: f.node_children("Cinema")) {
                /* Slightly grotty two-part construction of Cinema here so that we can use
                   shared_from_this.
                */
@@ -1229,7 +1228,7 @@ Config::read_dkdm_recipients (cxml::Document const & f)
 {
        _dkdm_recipients.clear ();
        list<cxml::NodePtr> cin = f.node_children ("DKDMRecipient");
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("DKDMRecipient")) {
+       for (auto i: f.node_children("DKDMRecipient")) {
                _dkdm_recipients.push_back (shared_ptr<DKDMRecipient>(new DKDMRecipient(i)));
        }
 }
index efcec53..5fb9d32 100644 (file)
@@ -92,7 +92,7 @@ Content::Content (cxml::ConstNodePtr node)
        : _change_signals_frequent (false)
 {
        list<cxml::NodePtr> path_children = node->node_children ("Path");
-       BOOST_FOREACH (cxml::NodePtr i, path_children) {
+       for (auto i: path_children) {
                _paths.push_back (i->content());
                optional<time_t> const mod = i->optional_number_attribute<time_t>("mtime");
                if (mod) {
@@ -192,7 +192,7 @@ Content::examine (shared_ptr<const Film>, shared_ptr<Job> job)
        _digest = d;
 
        _last_write_times.clear ();
-       BOOST_FOREACH (boost::filesystem::path i, _paths) {
+       for (auto i: _paths) {
                _last_write_times.push_back (boost::filesystem::last_write_time(i));
        }
 }
@@ -327,7 +327,7 @@ Content::identifier () const
 bool
 Content::paths_valid () const
 {
-       BOOST_FOREACH (boost::filesystem::path i, _paths) {
+       for (auto i: _paths) {
                if (!boost::filesystem::exists (i)) {
                        return false;
                }
@@ -345,7 +345,7 @@ Content::set_paths (vector<boost::filesystem::path> paths)
                boost::mutex::scoped_lock lm (_mutex);
                _paths = paths;
                _last_write_times.clear ();
-               BOOST_FOREACH (boost::filesystem::path i, _paths) {
+               for (auto i: _paths) {
                        _last_write_times.push_back (boost::filesystem::last_write_time(i));
                }
        }
@@ -495,7 +495,7 @@ Content::only_text () const
 shared_ptr<TextContent>
 Content::text_of_original_type (TextType type) const
 {
-       BOOST_FOREACH (shared_ptr<TextContent> i, text) {
+       for (auto i: text) {
                if (i->original_type() == type) {
                        return i;
                }
index edc806b..f8556b1 100644 (file)
@@ -23,7 +23,6 @@
 #include "dcpomatic_log.h"
 #include "warnings.h"
 #include <dcp/raw_convert.h>
-#include <boost/foreach.hpp>
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
@@ -38,7 +37,7 @@ Drive::Drive (string xml)
        cxml::Document doc;
        doc.read_string (xml);
        _device = doc.string_child("Device");
-       BOOST_FOREACH (cxml::ConstNodePtr i, doc.node_children("MountPoint")) {
+       for (auto i: doc.node_children("MountPoint")) {
                _mount_points.push_back (i->content());
        }
        _size = doc.number_child<uint64_t>("Size");
@@ -53,7 +52,7 @@ Drive::as_xml () const
        xmlpp::Document doc;
        xmlpp::Element* root = doc.create_root_node ("Drive");
        root->add_child("Device")->add_child_text(_device);
-       BOOST_FOREACH (boost::filesystem::path i, _mount_points) {
+       for (auto i: _mount_points) {
                root->add_child("MountPoint")->add_child_text(i.string());
        }
        root->add_child("Size")->add_child_text(dcp::raw_convert<string>(_size));
@@ -96,7 +95,7 @@ string
 Drive::log_summary () const
 {
        string mp;
-       BOOST_FOREACH (boost::filesystem::path i, _mount_points) {
+       for (auto i: _mount_points) {
                mp += i.string() + ",";
        }
        if (mp.empty()) {
index 247bf4a..c001cbf 100644 (file)
@@ -31,7 +31,6 @@ extern "C" {
 #include <libavformat/avio.h>
 }
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <boost/function.hpp>
 #if BOOST_VERSION >= 106100
 #include <boost/dll/runtime_symbol_info.hpp>
@@ -350,7 +349,7 @@ Drive::get ()
 bool
 Drive::unmount ()
 {
-       BOOST_FOREACH (boost::filesystem::path i, _mount_points) {
+       for (auto i: _mount_points) {
                int const r = umount(i.string().c_str());
                LOG_DISK("Tried to unmount %1 and got %2 and %3", i.string(), r, errno);
                if (r == -1) {
index 76c451a..8b60ff4 100644 (file)
@@ -31,7 +31,6 @@ extern "C" {
 #include <libavformat/avio.h>
 }
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <boost/regex.hpp>
 #if BOOST_VERSION >= 106100
 #include <boost/dll/runtime_symbol_info.hpp>
@@ -331,7 +330,7 @@ analyse_media_path (CFDictionaryRef& description)
 
        vector<string> bits;
        split(bits, path, boost::is_any_of("/"));
-       BOOST_FOREACH (string i, bits) {
+       for (auto i: bits) {
                if (starts_with(i, "PRT")) {
                        mp.prt = i;
                }
@@ -468,11 +467,11 @@ Drive::get ()
        CFRelease(session);
 
        /* Mark disks containing mounted partitions as themselves mounted */
-       BOOST_FOREACH (Disk& i, disks) {
+       for (auto& i: disks) {
                if (!i.whole) {
                        continue;
                }
-               BOOST_FOREACH (Disk& j, disks) {
+               for (auto& j: disks) {
                        if (!j.mount_points.empty() && starts_with(j.mount_point, i.mount_point)) {
                                LOG_DISK("Marking %1 as mounted because %2 is", i.mount_point, j.mount_point);
                                std::copy(j.mount_points.begin(), j.mount_points.end(), back_inserter(i.mount_points));
@@ -482,7 +481,7 @@ Drive::get ()
 
        /* Make a map of the PRT codes and mount points of mounted, synthesized disks */
        map<string, vector<boost::filesystem::path> > mounted_synths;
-       BOOST_FOREACH (Disk& i, disks) {
+       for (auto& i: disks) {
                if (!i.real && !i.mount_points.empty()) {
                        LOG_DISK("Found a mounted synth %1 with %2", i.mount_point, i.prt);
                        mounted_synths[i.prt] = i.mount_points;
@@ -490,7 +489,7 @@ Drive::get ()
        }
 
        /* Mark containers of those mounted synths as themselves mounted */
-       BOOST_FOREACH (Disk& i, disks) {
+       for (auto& i: disks) {
                if (i.real) {
                        map<string, vector<boost::filesystem::path> >::const_iterator j = mounted_synths.find(i.prt);
                        if (j != mounted_synths.end()) {
@@ -501,7 +500,7 @@ Drive::get ()
        }
 
        vector<Drive> drives;
-       BOOST_FOREACH (Disk& i, disks) {
+       for (auto& i: disks) {
                if (i.whole) {
                        /* A whole disk that is not a container for a mounted synth */
                        drives.push_back(Drive(i.mount_point, i.mount_points, i.size, i.vendor, i.model));
index 1fe5556..0ab56bb 100644 (file)
@@ -31,7 +31,6 @@ extern "C" {
 #include <libavformat/avio.h>
 }
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <boost/dll/runtime_symbol_info.hpp>
 #include <windows.h>
 #include <winternl.h>
index 8baf489..421dbbf 100644 (file)
@@ -28,7 +28,6 @@
 #include <dcp/dcp.h>
 #include <dcp/decrypted_kdm.h>
 #include <dcp/exceptions.h>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -46,13 +45,13 @@ DCP::cpls () const
        list<shared_ptr<dcp::CPL> > cpls;
 
        LOG_GENERAL ("Reading %1 DCP directories", _dcp_content->directories().size());
-       BOOST_FOREACH (boost::filesystem::path i, _dcp_content->directories()) {
+       for (auto i: _dcp_content->directories()) {
                shared_ptr<dcp::DCP> dcp (new dcp::DCP (i));
                list<dcp::VerificationNote> notes;
                dcp->read (&notes, true);
                if (!_tolerant) {
                        /** We accept and ignore EMPTY_ASSET_PATH and EXTERNAL_ASSET but everything else is bad */
-                       BOOST_FOREACH (dcp::VerificationNote j, notes) {
+                       for (auto j: notes) {
                                if (j.code() == dcp::VerificationNote::EMPTY_ASSET_PATH || j.code() == dcp::VerificationNote::EXTERNAL_ASSET) {
                                        LOG_WARNING("Empty path in ASSETMAP of %1", i.string());
                                } else {
@@ -62,13 +61,13 @@ DCP::cpls () const
                }
                dcps.push_back (dcp);
                LOG_GENERAL ("Reading DCP %1: %2 CPLs", i.string(), dcp->cpls().size());
-               BOOST_FOREACH (shared_ptr<dcp::CPL> i, dcp->cpls()) {
+               for (auto i: dcp->cpls()) {
                        cpls.push_back (i);
                }
        }
 
-       BOOST_FOREACH (shared_ptr<dcp::DCP> i, dcps) {
-               BOOST_FOREACH (shared_ptr<dcp::DCP> j, dcps) {
+       for (auto i: dcps) {
+               for (auto j: dcps) {
                        if (i != j) {
                                i->resolve_refs (j->assets (true));
                        }
@@ -77,7 +76,7 @@ DCP::cpls () const
 
        if (_dcp_content->kdm ()) {
                dcp::DecryptedKDM k = decrypt_kdm_with_helpful_error (_dcp_content->kdm().get());
-               BOOST_FOREACH (shared_ptr<dcp::DCP> i, dcps) {
+               for (auto i: dcps) {
                        i->add (k);
                }
        }
index d4bd58e..e43d88a 100644 (file)
@@ -40,7 +40,6 @@
 #include <dcp/reel_subtitle_asset.h>
 #include <dcp/reel.h>
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <iterator>
 #include <iostream>
 
@@ -151,19 +150,19 @@ DCPContent::DCPContent (cxml::ConstNodePtr node, int version)
                _content_kind = dcp::content_kind_from_string (*ck);
        }
        _cpl = node->optional_string_child("CPL");
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("ReelLength")) {
+       for (auto i: node->node_children("ReelLength")) {
                _reel_lengths.push_back (raw_convert<int64_t> (i->content ()));
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Marker")) {
+       for (auto i: node->node_children("Marker")) {
                _markers[dcp::marker_from_string(i->string_attribute("type"))] = ContentTime(raw_convert<int64_t>(i->content()));
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Rating")) {
+       for (auto i: node->node_children("Rating")) {
                _ratings.push_back (dcp::Rating(i));
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("ContentVersion")) {
+       for (auto i: node->node_children("ContentVersion")) {
                _content_versions.push_back (i->content());
        }
 }
@@ -352,7 +351,7 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
                audio->stream()->mapping().as_xml (node->add_child("AudioMapping"));
        }
 
-       BOOST_FOREACH (shared_ptr<TextContent> i, text) {
+       for (auto i: text) {
                i->as_xml (node);
        }
 
@@ -391,7 +390,7 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
        if (_cpl) {
                node->add_child("CPL")->add_child_text (_cpl.get ());
        }
-       BOOST_FOREACH (int64_t i, _reel_lengths) {
+       for (auto i: _reel_lengths) {
                node->add_child("ReelLength")->add_child_text (raw_convert<string> (i));
        }
 
@@ -401,12 +400,12 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
                marker->add_child_text(raw_convert<string>(i->second.get()));
        }
 
-       BOOST_FOREACH (dcp::Rating i, _ratings) {
+       for (auto i: _ratings) {
                xmlpp::Element* rating = node->add_child("Rating");
                i.as_xml (rating);
        }
 
-       BOOST_FOREACH (string i, _content_versions) {
+       for (auto i: _content_versions) {
                node->add_child("ContentVersion")->add_child_text(i);
        }
 }
@@ -439,7 +438,7 @@ DCPContent::identifier () const
                s += video->identifier() + "_";
        }
 
-       BOOST_FOREACH (shared_ptr<TextContent> i, text) {
+       for (auto i: text) {
                s += i->identifier () + " ";
        }
 
@@ -566,7 +565,7 @@ DCPContent::reels (shared_ptr<const Film> film) const
        /* The starting point of this content on the timeline */
        DCPTime pos = position() - DCPTime (trim_start().get());
 
-       BOOST_FOREACH (int64_t i, reel_lengths) {
+       for (auto i: reel_lengths) {
                /* This reel runs from `pos' to `to' */
                DCPTime const to = pos + DCPTime::from_frames (i, film->video_frame_rate());
                if (to > position()) {
@@ -585,7 +584,7 @@ list<DCPTime>
 DCPContent::reel_split_points (shared_ptr<const Film> film) const
 {
        list<DCPTime> s;
-       BOOST_FOREACH (DCPTimePeriod i, reels(film)) {
+       for (auto i: reels(film)) {
                s.push_back (i.from);
        }
        return s;
@@ -630,7 +629,7 @@ DCPContent::can_reference (shared_ptr<const Film> film, function<bool (shared_pt
        /* fr must contain reels().  It can also contain other reels, but it must at
           least contain reels().
        */
-       BOOST_FOREACH (DCPTimePeriod i, reel_list) {
+       for (auto i: reel_list) {
                if (find (fr.begin(), fr.end(), i) == fr.end ()) {
                        /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
                        why_not = _("its reel lengths differ from those in the film; set the reel mode to 'split by video content'.");
@@ -703,7 +702,7 @@ DCPContent::can_reference_audio (shared_ptr<const Film> film, string& why_not) c
                return false;
        }
 
-        BOOST_FOREACH (shared_ptr<dcp::Reel> i, decoder->reels()) {
+        for (auto i: decoder->reels()) {
                 if (!i->main_sound()) {
                        /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
                         why_not = _("it does not have sound in all its reels.");
@@ -735,7 +734,7 @@ DCPContent::can_reference_text (shared_ptr<const Film> film, TextType type, stri
                return false;
        }
 
-        BOOST_FOREACH (shared_ptr<dcp::Reel> i, decoder->reels()) {
+        for (auto i: decoder->reels()) {
                 if (type == TEXT_OPEN_SUBTITLE) {
                        if (!i->main_subtitle()) {
                                /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
@@ -753,7 +752,7 @@ DCPContent::can_reference_text (shared_ptr<const Film> film, TextType type, stri
                                why_not = _("it does not have closed captions in all its reels.");
                                return false;
                        }
-                       BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> j, i->closed_captions()) {
+                       for (auto j: i->closed_captions()) {
                                if (j->entry_point().get_value_or(0) != 0) {
                                        /// TRANSLATORS: this string will follow "Cannot reference this DCP: "
                                        why_not = _("one if its closed caption has a non-zero entry point so it must be re-written.");
index 4fedd36..c31c507 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "dcp_content_type.h"
 #include "dcpomatic_assert.h"
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -60,7 +59,7 @@ DCPContentType::setup_dcp_content_types ()
 DCPContentType const *
 DCPContentType::from_isdcf_name (string n)
 {
-       BOOST_FOREACH (DCPContentType const * i, _dcp_content_types) {
+       for (auto i: _dcp_content_types) {
                if (i->isdcf_name() == n) {
                        return i;
                }
@@ -72,7 +71,7 @@ DCPContentType::from_isdcf_name (string n)
 DCPContentType const *
 DCPContentType::from_libdcp_kind (dcp::ContentKind kind)
 {
-       BOOST_FOREACH (DCPContentType const * i, _dcp_content_types) {
+       for (auto i: _dcp_content_types) {
                if (i->libdcp_kind() == kind) {
                        return i;
                }
index aa8fed2..71eb0ba 100644 (file)
@@ -49,7 +49,6 @@
 #include <dcp/subtitle_image.h>
 #include <dcp/decrypted_kdm.h>
 #include <dcp/reel_atmos_asset.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -76,7 +75,7 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent
                if (c->audio) {
                        audio.reset (new AudioDecoder (this, c->audio, fast));
                }
-               BOOST_FOREACH (shared_ptr<TextContent> i, c->text) {
+               for (auto i: c->text) {
                        /* XXX: this time here should be the time of the first subtitle, not 0 */
                        text.push_back (shared_ptr<TextDecoder> (new TextDecoder (this, i, ContentTime())));
                }
@@ -106,7 +105,7 @@ DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent
                }
 
                shared_ptr<dcp::CPL> cpl;
-               BOOST_FOREACH (shared_ptr<dcp::CPL> i, cpl_list) {
+               for (auto i: cpl_list) {
                        if (_dcp_content->cpl() && i->id() == _dcp_content->cpl().get()) {
                                cpl = i;
                        }
@@ -263,7 +262,7 @@ DCPDecoder::pass_texts (ContentTime next, dcp::Size size)
                ++decoder;
        }
 
-       BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> i, (*_reel)->closed_captions()) {
+       for (auto i: (*_reel)->closed_captions()) {
                pass_texts (
                        next, i->asset(), _dcp_content->reference_text(TEXT_CLOSED_CAPTION), i->entry_point().get_value_or(0), *decoder, size
                        );
@@ -289,7 +288,7 @@ DCPDecoder::pass_texts (
 
                list<dcp::SubtitleString> strings;
 
-               BOOST_FOREACH (shared_ptr<dcp::Subtitle> i, subs) {
+               for (auto i: subs) {
                        shared_ptr<dcp::SubtitleString> is = dynamic_pointer_cast<dcp::SubtitleString> (i);
                        if (is) {
                                if (!strings.empty() && (strings.back().in() != is->in() || strings.back().out() != is->out())) {
@@ -471,7 +470,7 @@ string
 DCPDecoder::calculate_lazy_digest (shared_ptr<const DCPContent> c) const
 {
        Digester d;
-       BOOST_FOREACH (boost::filesystem::path i, c->paths()) {
+       for (auto i: c->paths()) {
                d.add (i.string());
        }
        if (_dcp_content->kdm()) {
@@ -495,7 +494,7 @@ vector<FontData>
 DCPDecoder::fonts () const
 {
        vector<FontData> data;
-       BOOST_FOREACH (shared_ptr<dcp::Reel> i, _reels) {
+       for (auto i: _reels) {
                if (i->main_subtitle() && i->main_subtitle()->asset()) {
                        map<string, dcp::ArrayData> fm = i->main_subtitle()->asset()->font_data();
                        for (map<string, dcp::ArrayData>::const_iterator j = fm.begin(); j != fm.end(); ++j) {
index dfd8ed8..0478fcf 100644 (file)
@@ -38,7 +38,6 @@
 #include "text_content.h"
 #include "player_video.h"
 #include <boost/signals2.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -70,8 +69,8 @@ DCPEncoder::DCPEncoder (shared_ptr<const Film> film, weak_ptr<Job> job)
        _player_text_connection = _player->Text.connect (bind (&DCPEncoder::text, this, _1, _2, _3, _4));
        _player_atmos_connection = _player->Atmos.connect (bind (&DCPEncoder::atmos, this, _1, _2, _3));
 
-       BOOST_FOREACH (shared_ptr<const Content> c, film->content ()) {
-               BOOST_FOREACH (shared_ptr<TextContent> i, c->text) {
+       for (auto c: film->content ()) {
+               for (auto i: c->text) {
                        if (i->use() && !i->burn()) {
                                _non_burnt_subtitles = true;
                        }
@@ -120,7 +119,7 @@ DCPEncoder::go ()
 
        while (!_player->pass ()) {}
 
-       BOOST_FOREACH (ReferencedReelAsset i, _player->get_reel_assets ()) {
+       for (auto i: _player->get_reel_assets()) {
                _writer->write (i);
        }
 
index fc1fbc5..191022f 100644 (file)
@@ -44,7 +44,6 @@
 #include <dcp/reel_closed_caption_asset.h>
 #include <dcp/reel_markers_asset.h>
 #include <dcp/sound_asset.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -77,7 +76,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
 
        if (content->cpl ()) {
                /* Use the CPL that the content was using before */
-               BOOST_FOREACH (shared_ptr<dcp::CPL> i, cpls()) {
+               for (auto i: cpls()) {
                        if (i->id() == content->cpl().get()) {
                                cpl = i;
                        }
@@ -87,9 +86,9 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
 
                int least_unsatisfied = INT_MAX;
 
-               BOOST_FOREACH (shared_ptr<dcp::CPL> i, cpls()) {
+               for (auto i: cpls()) {
                        int unsatisfied = 0;
-                       BOOST_FOREACH (shared_ptr<dcp::Reel> j, i->reels()) {
+                       for (auto j: i->reels()) {
                                if (j->main_picture() && !j->main_picture()->asset_ref().resolved()) {
                                        ++unsatisfied;
                                }
@@ -119,7 +118,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
        _name = cpl->content_title_text ();
        _content_kind = cpl->content_kind ();
 
-       BOOST_FOREACH (shared_ptr<dcp::Reel> i, cpl->reels()) {
+       for (auto i: cpl->reels()) {
 
                if (i->main_picture ()) {
                        if (!i->main_picture()->asset_ref().resolved()) {
@@ -182,7 +181,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
                        _text_count[TEXT_OPEN_SUBTITLE] = 1;
                }
 
-               BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> j, i->closed_captions()) {
+               for (auto j: i->closed_captions()) {
                        if (!j->asset_ref().resolved()) {
                                /* We are missing this asset so we can't continue; examination will be repeated later */
                                _needs_assets = true;
@@ -225,7 +224,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
 
        /* Check that we can read the first picture, sound and subtitle frames of each reel */
        try {
-               BOOST_FOREACH (shared_ptr<dcp::Reel> i, cpl->reels()) {
+               for (auto i: cpl->reels()) {
                        shared_ptr<dcp::PictureAsset> pic = i->main_picture()->asset ();
                        shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (pic);
                        shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (pic);
@@ -260,7 +259,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
        _three_d = !cpl->reels().empty() && cpl->reels().front()->main_picture() &&
                dynamic_pointer_cast<dcp::StereoPictureAsset> (cpl->reels().front()->main_picture()->asset());
        _ratings = cpl->ratings();
-       BOOST_FOREACH (dcp::ContentVersion i, cpl->content_versions()) {
+       for (auto i: cpl->content_versions()) {
                _content_versions.push_back (i.label_text);
        }
 
index d58779e..2c5d98e 100644 (file)
@@ -27,7 +27,6 @@
 #include <dcp/smpte_subtitle_asset.h>
 #include <dcp/interop_load_font_node.h>
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -73,7 +72,7 @@ DCPSubtitleContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
 
        sc->fix_empty_font_ids ();
 
-       BOOST_FOREACH (shared_ptr<dcp::LoadFontNode> i, sc->load_font_nodes ()) {
+       for (auto i: sc->load_font_nodes()) {
                only_text()->add_font (shared_ptr<Font> (new Font (i->id)));
        }
 }
index 5c14b78..5372df0 100644 (file)
@@ -54,7 +54,7 @@ DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const Film> film, shared_ptr<
        }
 
        /* Add a default font for any LoadFont nodes in our file which we haven't yet found fonts for */
-       BOOST_FOREACH (shared_ptr<dcp::LoadFontNode> i, c->load_font_nodes()) {
+       for (auto i: c->load_font_nodes()) {
                if (fm.find(i->id) == fm.end()) {
                        _fonts.push_back (FontData(i->id, dcp::ArrayData(default_font_file())));
                }
index 897b725..62d8a28 100644 (file)
@@ -28,7 +28,6 @@
 #include "frame_rate_change.h"
 #include "dcpomatic_assert.h"
 #include <boost/optional.hpp>
-#include <boost/foreach.hpp>
 #include <stdint.h>
 #include <cmath>
 #include <ostream>
@@ -319,9 +318,9 @@ std::list<TimePeriod<T> > subtract (TimePeriod<T> A, std::list<TimePeriod<T> > c
        std::list<TimePeriod<T> > result;
        result.push_back (A);
 
-       BOOST_FOREACH (TimePeriod<T> i, B) {
+       for (auto i: B) {
                std::list<TimePeriod<T> > new_result;
-               BOOST_FOREACH (TimePeriod<T> j, result) {
+               for (auto j: result) {
                        boost::optional<TimePeriod<T> > ov = i.overlap (j);
                        if (ov) {
                                if (*ov == i) {
index a531180..bf0bd1a 100644 (file)
@@ -60,7 +60,7 @@ Decoder::position () const
           which can cause bugs like #1581.
        */
        if (!pos) {
-               BOOST_FOREACH (shared_ptr<TextDecoder> i, text) {
+               for (auto i: text) {
                        if (!i->ignore() && (!pos || i->position(f) < *pos)) {
                                pos = i->position(f);
                        }
@@ -79,7 +79,7 @@ Decoder::seek (ContentTime, bool)
        if (audio) {
                audio->seek ();
        }
-       BOOST_FOREACH (shared_ptr<TextDecoder> i, text) {
+       for (auto i: text) {
                i->seek ();
        }
 }
index f68a443..1acef6f 100644 (file)
@@ -33,7 +33,6 @@
 #include "video_mxf_content.h"
 #include "video_mxf_decoder.h"
 #include "timer.h"
-#include <boost/foreach.hpp>
 
 using std::list;
 using std::shared_ptr;
index a12d95a..22da53f 100644 (file)
@@ -22,7 +22,6 @@
 #include "kdm_with_metadata.h"
 #include "film.h"
 #include <dcp/raw_convert.h>
-#include <boost/foreach.hpp>
 
 
 using std::string;
@@ -34,7 +33,7 @@ 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 +47,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);
        }
 
index 66f6711..74a7196 100644 (file)
@@ -25,7 +25,6 @@
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 
 using std::string;
 using std::list;
@@ -39,7 +38,7 @@ DKDMBase::read (cxml::ConstNodePtr node)
                return shared_ptr<DKDM> (new DKDM (dcp::EncryptedKDM (node->content ())));
        } else if (node->name() == "DKDMGroup") {
                shared_ptr<DKDMGroup> group (new DKDMGroup (node->string_attribute ("Name")));
-               BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children()) {
+               for (auto i: node->node_children()) {
                        shared_ptr<DKDMBase> c = read (i);
                        if (c) {
                                group->add (c);
@@ -68,7 +67,7 @@ DKDMGroup::as_xml (xmlpp::Element* node) const
 {
        xmlpp::Element* f = node->add_child("DKDMGroup");
        f->set_attribute ("Name", _name);
-       BOOST_FOREACH (shared_ptr<DKDMBase> i, _children) {
+       for (auto i: _children) {
                i->as_xml (f);
        }
 }
index b7cae70..c4637ff 100644 (file)
@@ -25,7 +25,6 @@
 #include <curl/curl.h>
 #include <boost/algorithm/string.hpp>
 #include <boost/date_time/c_local_time_adjustor.hpp>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -144,7 +143,7 @@ Emailer::send (string server, int port, EmailProtocol protocol, string user, str
 
        _email += _body;
 
-       BOOST_FOREACH (Attachment i, _attachments) {
+       for (auto i: _attachments) {
                _email += "\r\n\r\n--" + boundary + "\r\n"
                        "Content-Type: " + i.mime_type + "; name=" + i.name + "\r\n"
                        "Content-Transfer-Encoding: Base64\r\n"
@@ -194,13 +193,13 @@ Emailer::send (string server, int port, EmailProtocol protocol, string user, str
        curl_easy_setopt (curl, CURLOPT_MAIL_FROM, _from.c_str());
 
        struct curl_slist* recipients = 0;
-       BOOST_FOREACH (string i, _to) {
+       for (auto i: _to) {
                recipients = curl_slist_append (recipients, i.c_str());
        }
-       BOOST_FOREACH (string i, _cc) {
+       for (auto i: _cc) {
                recipients = curl_slist_append (recipients, i.c_str());
        }
-       BOOST_FOREACH (string i, _bcc) {
+       for (auto i: _bcc) {
                recipients = curl_slist_append (recipients, i.c_str());
        }
 
@@ -233,7 +232,7 @@ string
 Emailer::address_list (list<string> addresses)
 {
        string o;
-       BOOST_FOREACH (string i, addresses) {
+       for (auto i: addresses) {
                o += i + ", ";
        }
 
index 00baaeb..0cf2b85 100644 (file)
@@ -26,7 +26,6 @@
 #include "dcp_content.h"
 #include "dcpomatic_time_coalesce.h"
 #include "piece.h"
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -39,7 +38,7 @@ using namespace dcpomatic;
 Empty::Empty (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist, function<bool (shared_ptr<const Content>)> part, DCPTime length)
 {
        list<DCPTimePeriod> full;
-       BOOST_FOREACH (shared_ptr<Content> i, playlist->content()) {
+       for (auto i: playlist->content()) {
                if (part(i)) {
                        full.push_back (DCPTimePeriod (i->position(), i->end(film)));
                }
@@ -57,13 +56,13 @@ Empty::set_position (DCPTime position)
 {
        _position = position;
 
-       BOOST_FOREACH (DCPTimePeriod i, _periods) {
+       for (auto i: _periods) {
                if (i.contains(_position)) {
                        return;
                }
        }
 
-       BOOST_FOREACH (DCPTimePeriod i, _periods) {
+       for (auto i: _periods) {
                if (i.from > _position) {
                        _position = i.from;
                        return;
@@ -74,7 +73,7 @@ Empty::set_position (DCPTime position)
 DCPTimePeriod
 Empty::period_at_position () const
 {
-       BOOST_FOREACH (DCPTimePeriod i, _periods) {
+       for (auto i: _periods) {
                if (i.contains(_position)) {
                        return DCPTimePeriod (_position, i.to);
                }
@@ -87,7 +86,7 @@ bool
 Empty::done () const
 {
        DCPTime latest;
-       BOOST_FOREACH (DCPTimePeriod i, _periods) {
+       for (auto i: _periods) {
                latest = max (latest, i.to);
        }
 
index a14578a..6ec3e70 100644 (file)
@@ -44,7 +44,6 @@ DCPOMATIC_DISABLE_WARNINGS
 DCPOMATIC_ENABLE_WARNINGS
 #include <boost/algorithm/string.hpp>
 #include <boost/scoped_array.hpp>
-#include <boost/foreach.hpp>
 #ifdef HAVE_VALGRIND_H
 #include <valgrind/memcheck.h>
 #endif
index 5a5a2bf..396d676 100644 (file)
@@ -122,7 +122,7 @@ try
                }
 
                /* Query our `definite' servers (if there are any) */
-               BOOST_FOREACH (string const& i, Config::instance()->servers()) {
+               for (auto const& i: Config::instance()->servers()) {
                        try {
                                boost::asio::ip::udp::resolver resolver (io_service);
                                boost::asio::ip::udp::resolver::query query (i, raw_convert<string> (HELLO_PORT));
index 751bab5..086afd9 100644 (file)
@@ -57,7 +57,6 @@ extern "C" {
 #include <lwext4/ext4_mkfs.h>
 }
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <string>
 
 
@@ -246,7 +245,7 @@ void
 verify (vector<CopiedFile> const& copied_files, uint64_t total, Nanomsg* nanomsg)
 {
        uint64_t total_remaining = total;
-       BOOST_FOREACH (CopiedFile const& i, copied_files) {
+       for (auto const& i: copied_files) {
                string const read_digest = read (i.from, i.to, total_remaining, total, nanomsg);
                LOG_DISK ("Read %1 %2 was %3 on write, now %4", i.from.string(), i.to.generic_string(), i.write_digest, read_digest);
                if (read_digest != i.write_digest) {
index 11a332b..85c6576 100644 (file)
@@ -37,7 +37,6 @@ extern "C" {
 #include <libswscale/swscale.h>
 }
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -314,7 +313,7 @@ FFmpeg::pts_offset (vector<shared_ptr<FFmpegAudioStream> > audio_streams, option
                po = - first_video.get ();
        }
 
-       BOOST_FOREACH (shared_ptr<FFmpegAudioStream> i, audio_streams) {
+       for (auto i: audio_streams) {
                if (i->first_audio) {
                        po = max (po, - i->first_audio.get ());
                }
index 6f3acef..234c792 100644 (file)
@@ -41,7 +41,6 @@ extern "C" {
 #include <libavutil/pixdesc.h>
 }
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -202,7 +201,7 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
        if (audio) {
                audio->as_xml (node);
 
-               BOOST_FOREACH (AudioStreamPtr i, audio->streams ()) {
+               for (auto i: audio->streams ()) {
                        shared_ptr<FFmpegAudioStream> f = dynamic_pointer_cast<FFmpegAudioStream> (i);
                        DCPOMATIC_ASSERT (f);
                        f->as_xml (node->add_child("AudioStream"));
@@ -296,7 +295,7 @@ FFmpegContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
                if (!examiner->audio_streams().empty ()) {
                        audio.reset (new AudioContent (this));
 
-                       BOOST_FOREACH (shared_ptr<FFmpegAudioStream> i, examiner->audio_streams ()) {
+                       for (auto i: examiner->audio_streams ()) {
                                audio->add_stream (i);
                        }
 
@@ -345,7 +344,7 @@ string
 FFmpegContent::technical_summary () const
 {
        string as = "";
-       BOOST_FOREACH (shared_ptr<FFmpegAudioStream> i, ffmpeg_audio_streams ()) {
+       for (auto i: ffmpeg_audio_streams ()) {
                as += i->technical_summary () + " " ;
        }
 
@@ -408,7 +407,7 @@ FFmpegContent::full_length (shared_ptr<const Film> film) const
 
        if (audio) {
                DCPTime longest;
-               BOOST_FOREACH (AudioStreamPtr i, audio->streams()) {
+               for (auto i: audio->streams()) {
                        longest = max (longest, DCPTime::from_frames(llrint(i->length() / frc.speed_up), i->frame_rate()));
                }
                return longest;
@@ -429,7 +428,7 @@ FFmpegContent::approximate_length () const
        DCPOMATIC_ASSERT (audio);
 
        Frame longest = 0;
-       BOOST_FOREACH (AudioStreamPtr i, audio->streams ()) {
+       for (auto i: audio->streams()) {
                longest = max (longest, Frame(llrint(i->length())));
        }
 
@@ -670,7 +669,7 @@ FFmpegContent::ffmpeg_audio_streams () const
        vector<shared_ptr<FFmpegAudioStream> > fa;
 
        if (audio) {
-               BOOST_FOREACH (AudioStreamPtr i, audio->streams()) {
+               for (auto i: audio->streams()) {
                        fa.push_back (dynamic_pointer_cast<FFmpegAudioStream> (i));
                }
        }
index ae4ab23..b050fc5 100644 (file)
@@ -51,7 +51,6 @@ extern "C" {
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 }
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <vector>
 #include <iomanip>
@@ -134,7 +133,7 @@ FFmpegDecoder::flush ()
                }
        }
 
-       BOOST_FOREACH (shared_ptr<FFmpegAudioStream> i, _ffmpeg_content->ffmpeg_audio_streams ()) {
+       for (auto i: _ffmpeg_content->ffmpeg_audio_streams ()) {
                ContentTime a = audio->stream_position(film(), i);
                /* Unfortunately if a is 0 that really means that we don't know the stream position since
                   there has been no data on it since the last seek.  In this case we'll just do nothing
@@ -400,7 +399,7 @@ FFmpegDecoder::seek (ContentTime time, bool accurate)
        }
 
 DCPOMATIC_DISABLE_WARNINGS
-       BOOST_FOREACH (shared_ptr<FFmpegAudioStream> i, ffmpeg_content()->ffmpeg_audio_streams()) {
+       for (auto i: ffmpeg_content()->ffmpeg_audio_streams()) {
                avcodec_flush_buffers (i->stream(_format_context)->codec);
        }
 DCPOMATIC_ENABLE_WARNINGS
@@ -411,7 +410,7 @@ DCPOMATIC_ENABLE_WARNINGS
 
        _have_current_subtitle = false;
 
-       BOOST_FOREACH (optional<ContentTime>& i, _next_time) {
+       for (auto& i: _next_time) {
                i = optional<ContentTime>();
        }
 }
@@ -744,7 +743,7 @@ FFmpegDecoder::decode_ass_subtitle (string ass, ContentTime from)
                _ffmpeg_content->video->size().height
                );
 
-       BOOST_FOREACH (sub::Subtitle const & i, sub::collect<list<sub::Subtitle> > (raw)) {
+       for (auto const& i: sub::collect<list<sub::Subtitle> > (raw)) {
                only_text()->emit_plain_start (from, i);
        }
 }
index 4e1f0bc..cc4f18b 100644 (file)
@@ -212,7 +212,7 @@ FFmpegEncoder::go ()
        }
        delete[] interleaved;
 
-       BOOST_FOREACH (FileEncoderSet i, file_encoders) {
+       for (auto i: file_encoders) {
                i.flush ();
        }
 }
index b75d6c5..23c2f1a 100644 (file)
@@ -36,7 +36,6 @@ extern "C" {
 #include <libavutil/display.h>
 }
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
index 9963756..0eea003 100644 (file)
@@ -385,7 +385,7 @@ DCPOMATIC_ENABLE_WARNINGS
                av_packet_unref (&packet);
 
                flushed_audio = true;
-               BOOST_FOREACH (shared_ptr<ExportAudioStream> i, _audio_streams) {
+               for (auto i: _audio_streams) {
                        if (!i->flush()) {
                                flushed_audio = false;
                        }
@@ -473,7 +473,7 @@ FFmpegFileEncoder::audio_frame (int size)
 {
        if (_audio_stream_per_channel) {
                int offset = 0;
-               BOOST_FOREACH (shared_ptr<ExportAudioStream> i, _audio_streams) {
+               for (auto i: _audio_streams) {
                        i->write (size, offset, 1, _pending_audio->data(), _audio_frames);
                        ++offset;
                }
index 72698fa..e500dd3 100644 (file)
@@ -24,7 +24,6 @@
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::string;
@@ -43,7 +42,7 @@ FFmpegSubtitleStream::FFmpegSubtitleStream (cxml::ConstNodePtr node, int version
 {
        if (version >= 33) {
                boost::mutex::scoped_lock lm (_mutex);
-               BOOST_FOREACH (cxml::NodePtr i, node->node_children ("Colour")) {
+               for (auto i: node->node_children ("Colour")) {
                        _colours[RGBA(i->node_child("From"))] = RGBA (i->node_child("To"));
                }
        }
index 68e5c1c..8bcbaeb 100644 (file)
@@ -69,7 +69,6 @@
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <boost/regex.hpp>
 #include <unistd.h>
 #include <stdexcept>
@@ -220,11 +219,11 @@ Film::Film (optional<boost::filesystem::path> dir)
 
 Film::~Film ()
 {
-       BOOST_FOREACH (boost::signals2::connection& i, _job_connections) {
+       for (auto& i: _job_connections) {
                i.disconnect ();
        }
 
-       BOOST_FOREACH (boost::signals2::connection& i, _audio_analysis_connections) {
+       for (auto& i: _audio_analysis_connections) {
                i.disconnect ();
        }
 }
@@ -288,7 +287,7 @@ Film::audio_analysis_path (shared_ptr<const Playlist> playlist) const
        boost::filesystem::path p = dir ("analysis");
 
        Digester digester;
-       BOOST_FOREACH (shared_ptr<Content> i, playlist->content ()) {
+       for (auto i: playlist->content ()) {
                if (!i->audio) {
                        continue;
                }
@@ -329,7 +328,7 @@ Film::subtitle_analysis_path (shared_ptr<const Content> content) const
                shared_ptr<TextContent> tc = content->text.front();
                digester.add (tc->x_scale());
                digester.add (tc->y_scale());
-               BOOST_FOREACH (shared_ptr<dcpomatic::Font> i, tc->fonts()) {
+               for (auto i: tc->fonts()) {
                        digester.add (i->id());
                }
                if (tc->effect()) {
@@ -380,7 +379,7 @@ Film::make_dcp (bool gui, bool check)
                set_name ("DCP");
        }
 
-       BOOST_FOREACH (shared_ptr<const Content> i, content ()) {
+       for (auto i: content ()) {
                if (!i->paths_valid()) {
                        throw runtime_error (_("some of your content is missing"));
                }
@@ -395,11 +394,11 @@ Film::make_dcp (bool gui, bool check)
 
        set_isdcf_date_today ();
 
-       BOOST_FOREACH (string i, environment_info ()) {
+       for (auto i: environment_info ()) {
                LOG_GENERAL_NC (i);
        }
 
-       BOOST_FOREACH (shared_ptr<const Content> i, content ()) {
+       for (auto i: content ()) {
                LOG_GENERAL ("Content: %1", i->technical_summary());
        }
        LOG_GENERAL ("DCP video rate %1 fps", video_frame_rate());
@@ -470,10 +469,10 @@ Film::metadata (bool with_content_paths) const
                m->set_attribute("Type", dcp::marker_to_string(i->first));
                m->add_child_text(raw_convert<string>(i->second.get()));
        }
-       BOOST_FOREACH (dcp::Rating i, _ratings) {
+       for (auto i: _ratings) {
                i.as_xml (root->add_child("Rating"));
        }
-       BOOST_FOREACH (string i, _content_versions) {
+       for (auto i: _content_versions) {
                root->add_child("ContentVersion")->add_child_text(i);
        }
        root->add_child("NameLanguage")->add_child_text(_name_language.to_string());
@@ -488,7 +487,7 @@ Film::metadata (bool with_content_paths) const
        root->add_child("LuminanceUnit")->add_child_text(dcp::Luminance::unit_to_string(_luminance.unit()));
        root->add_child("UserExplicitContainer")->add_child_text(_user_explicit_container ? "1" : "0");
        root->add_child("UserExplicitResolution")->add_child_text(_user_explicit_resolution ? "1" : "0");
-       BOOST_FOREACH (dcp::LanguageTag i, _subtitle_languages) {
+       for (auto i: _subtitle_languages) {
                root->add_child("SubtitleLanguage")->add_child_text(i.to_string());
        }
        _playlist->as_xml (root->add_child ("Playlist"), with_content_paths);
@@ -628,15 +627,15 @@ Film::read_metadata (optional<boost::filesystem::path> path)
        _reencode_j2k = f.optional_bool_child("ReencodeJ2K").get_value_or(false);
        _user_explicit_video_frame_rate = f.optional_bool_child("UserExplicitVideoFrameRate").get_value_or(false);
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("Marker")) {
+       for (auto i: f.node_children("Marker")) {
                _markers[dcp::marker_from_string(i->string_attribute("Type"))] = DCPTime(dcp::raw_convert<DCPTime::Type>(i->content()));
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("Rating")) {
+       for (auto i: f.node_children("Rating")) {
                _ratings.push_back (dcp::Rating(i));
        }
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("ContentVersion")) {
+       for (auto i: f.node_children("ContentVersion")) {
                _content_versions.push_back (i->content());
        }
 
@@ -674,7 +673,7 @@ Film::read_metadata (optional<boost::filesystem::path> path)
        _user_explicit_container = f.optional_bool_child("UserExplicitContainer").get_value_or(true);
        _user_explicit_resolution = f.optional_bool_child("UserExplicitResolution").get_value_or(true);
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_children("SubtitleLanguage")) {
+       for (auto i: f.node_children("SubtitleLanguage")) {
                _subtitle_languages.push_back (dcp::LanguageTag(i->content()));
        }
 
@@ -693,7 +692,7 @@ Film::read_metadata (optional<boost::filesystem::path> path)
 
        optional<dcp::LanguageTag> found_language;
 
-       BOOST_FOREACH (cxml::ConstNodePtr i, f.node_child("Playlist")->node_children("Content")) {
+       for (auto i: f.node_child("Playlist")->node_children("Content")) {
                cxml::ConstNodePtr text = i->optional_node_child("Text");
                if (text && text->optional_string_child("Language") && !found_language) {
                        try {
@@ -773,7 +772,7 @@ Film::mapped_audio_channels () const
                        mapped.push_back (i);
                }
        } else {
-               BOOST_FOREACH (shared_ptr<Content> i, content ()) {
+               for (auto i: content ()) {
                        if (i->audio) {
                                list<int> c = i->audio->mapping().mapped_output_channels ();
                                copy (c.begin(), c.end(), back_inserter (mapped));
@@ -884,7 +883,7 @@ Film::isdcf_name (bool if_created_now) const
        /* Interior aspect ratio.  The standard says we don't do this for trailers, for some strange reason */
        if (dcp_content_type() && dcp_content_type()->libdcp_kind() != dcp::TRAILER) {
                Ratio const * content_ratio = 0;
-               BOOST_FOREACH (shared_ptr<Content> i, content ()) {
+               for (auto i: content ()) {
                        if (i->video) {
                                /* Here's the first piece of video content */
                                content_ratio = Ratio::nearest_from_ratio(i->video->scaled_size(frame_size()).ratio());
@@ -907,8 +906,8 @@ Film::isdcf_name (bool if_created_now) const
 
                bool burnt_in = true;
                bool ccap = false;
-               BOOST_FOREACH (shared_ptr<Content> i, content()) {
-                       BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+               for (auto i: content()) {
+                       for (auto j: i->text) {
                                if (j->type() == TEXT_OPEN_SUBTITLE && j->use() && !j->burn()) {
                                        burnt_in = false;
                                } else if (j->type() == TEXT_CLOSED_CAPTION && j->use()) {
@@ -989,7 +988,7 @@ Film::isdcf_name (bool if_created_now) const
        }
 
        bool vf = false;
-       BOOST_FOREACH (shared_ptr<Content> i, content ()) {
+       for (auto i: content()) {
                shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (i);
                if (!dc) {
                        continue;
@@ -1345,7 +1344,7 @@ Film::add_content (shared_ptr<Content> c)
 
        if (_template_film) {
                /* Take settings from the first piece of content of c's type in _template */
-               BOOST_FOREACH (shared_ptr<Content> i, _template_film->content()) {
+               for (auto i: _template_film->content()) {
                        c->take_settings_from (i);
                }
        }
@@ -1365,7 +1364,7 @@ Film::maybe_set_container_and_resolution ()
 {
        /* Get the only piece of video content, if there is only one */
        shared_ptr<VideoContent> video;
-       BOOST_FOREACH (shared_ptr<const Content> i, _playlist->content()) {
+       for (auto i: _playlist->content()) {
                if (i->video) {
                        if (!video) {
                                video = i->video;
@@ -1490,7 +1489,7 @@ void
 Film::check_settings_consistency ()
 {
        optional<int> atmos_rate;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
 
                if (i->atmos) {
                        int rate = lrintf (i->atmos->edit_rate().as_float());
@@ -1505,7 +1504,7 @@ Film::check_settings_consistency ()
        }
 
        bool change_made = false;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i);
                if (!d) {
                        continue;
@@ -1593,7 +1592,7 @@ Film::active_area () const
        dcp::Size const frame = frame_size ();
        dcp::Size active;
 
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                if (i->video) {
                        dcp::Size s = i->video->scaled_size (frame);
                        active.width = max(active.width, s.width);
@@ -1639,7 +1638,7 @@ Film::make_kdm (
 
        /* Find keys that have been added to imported, encrypted DCP content */
        list<dcp::DecryptedKDMKey> imported_keys;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent> (i);
                if (d && d->kdm()) {
                        dcp::DecryptedKDM kdm (d->kdm().get(), Config::instance()->decryption_chain()->key().get());
@@ -1650,14 +1649,14 @@ Film::make_kdm (
 
        map<shared_ptr<const dcp::ReelMXF>, dcp::Key> keys;
 
-       BOOST_FOREACH(shared_ptr<const dcp::ReelMXF> i, cpl->reel_mxfs()) {
+       for (auto i: cpl->reel_mxfs()) {
                if (!i->key_id()) {
                        continue;
                }
 
                /* Get any imported key for this ID */
                bool done = false;
-               BOOST_FOREACH (dcp::DecryptedKDMKey j, imported_keys) {
+               for (auto j: imported_keys) {
                        if (j.id() == i->key_id().get()) {
                                LOG_GENERAL ("Using imported key for %1", i->key_id().get());
                                keys[i] = j.key();
@@ -1779,9 +1778,9 @@ Film::reels () const
                list<DCPTime> split_points;
                split_points.push_back (DCPTime());
                split_points.push_back (len);
-               BOOST_FOREACH (shared_ptr<Content> c, content()) {
+               for (auto c: content()) {
                        if (c->video) {
-                               BOOST_FOREACH (DCPTime t, c->reel_split_points(shared_from_this())) {
+                               for (auto t: c->reel_split_points(shared_from_this())) {
                                        split_points.push_back (t);
                                }
                                split_points.push_back (c->end(shared_from_this()));
@@ -1793,7 +1792,7 @@ Film::reels () const
 
                /* Make them into periods, coalescing any that are less than 1 second long */
                optional<DCPTime> last;
-               BOOST_FOREACH (DCPTime t, split_points) {
+               for (auto t: split_points) {
                        if (last && (t - *last) >= DCPTime::from_seconds(1)) {
                                /* Period from *last to t is long enough; use it and start a new one */
                                p.push_back (DCPTimePeriod(*last, t));
@@ -1870,7 +1869,7 @@ Film::copy_from (shared_ptr<const Film> film)
 bool
 Film::references_dcp_video () const
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _playlist->content()) {
+       for (auto i: _playlist->content()) {
                shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i);
                if (d && d->reference_video()) {
                        return true;
@@ -1883,7 +1882,7 @@ Film::references_dcp_video () const
 bool
 Film::references_dcp_audio () const
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _playlist->content()) {
+       for (auto i: _playlist->content()) {
                shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i);
                if (d && d->reference_audio()) {
                        return true;
@@ -1897,7 +1896,7 @@ Film::references_dcp_audio () const
 bool
 Film::contains_atmos_content () const
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _playlist->content()) {
+       for (auto i: _playlist->content()) {
                if (i->atmos) {
                        return true;
                }
@@ -1911,8 +1910,8 @@ list<DCPTextTrack>
 Film::closed_caption_tracks () const
 {
        list<DCPTextTrack> tt;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+       for (auto i: content()) {
+               for (auto j: i->text) {
                        /* XXX: Empty DCPTextTrack ends up being a magic value here - the "unknown" or "not specified" track */
                        DCPTextTrack dtt = j->dcp_track().get_value_or(DCPTextTrack());
                        if (j->type() == TEXT_CLOSED_CAPTION && find(tt.begin(), tt.end(), dtt) == tt.end()) {
index 663d145..6869d26 100644 (file)
@@ -26,7 +26,6 @@
 extern "C" {
 #include <libavfilter/avfilter.h>
 }
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -103,7 +102,7 @@ Filter::ffmpeg_string (vector<Filter const *> const & filters)
 {
        string ff;
 
-       BOOST_FOREACH (Filter const * i, filters) {
+       for (auto const i: filters) {
                if (!ff.empty ()) {
                        ff += N_(",");
                }
index a529573..aa9a8aa 100644 (file)
@@ -24,7 +24,6 @@
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 
 using std::string;
 using namespace dcpomatic;
@@ -32,7 +31,7 @@ using namespace dcpomatic;
 Font::Font (cxml::NodePtr node)
        : _id (node->string_child ("Id"))
 {
-       BOOST_FOREACH (cxml::NodePtr i, node->node_children("File")) {
+       for (auto i: node->node_children("File")) {
                string variant = i->optional_string_attribute("Variant").get_value_or ("Normal");
                if (variant == "Normal") {
                        _file = i->content();
index 27c0224..dcb9aea 100644 (file)
@@ -55,7 +55,7 @@ FrameIntervalChecker::guess () const
        }
 
        int near_1 = 0;
-       BOOST_FOREACH (double i, _intervals) {
+       for (auto i: _intervals) {
                if (i > 0.5) {
                        ++near_1;
                }
index e52e448..ca697ad 100644 (file)
@@ -40,7 +40,6 @@
 #include <dcp/reel.h>
 #include <dcp/reel_closed_caption_asset.h>
 #include <dcp/reel_subtitle_asset.h>
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 
@@ -126,7 +125,7 @@ Hints::check_incorrect_container ()
 {
        int narrower_than_scope = 0;
        int scope = 0;
-       BOOST_FOREACH (shared_ptr<const Content> i, film()->content()) {
+       for (auto i: film()->content()) {
                if (i->video) {
                        Ratio const * r = Ratio::nearest_from_ratio(i->video->scaled_size(film()->frame_size()).ratio());
                        if (r && r->id() == "239") {
@@ -206,7 +205,7 @@ Hints::check_speed_up ()
 {
        optional<double> lowest_speed_up;
        optional<double> highest_speed_up;
-       BOOST_FOREACH (shared_ptr<const Content> i, film()->content()) {
+       for (auto i: film()->content()) {
                double spu = film()->active_frame_rate_change(i->position()).speed_up;
                if (!lowest_speed_up || spu < *lowest_speed_up) {
                        lowest_speed_up = spu;
@@ -236,9 +235,9 @@ Hints::check_big_font_files ()
 {
        bool big_font_files = false;
        if (film()->interop ()) {
-               BOOST_FOREACH (shared_ptr<Content> i, film()->content()) {
-                       BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
-                               BOOST_FOREACH (shared_ptr<Font> k, j->fonts()) {
+               for (auto i: film()->content()) {
+                       for (auto j: i->text) {
+                               for (auto k: j->fonts()) {
                                        optional<boost::filesystem::path> const p = k->file ();
                                        if (p && boost::filesystem::file_size(p.get()) >= (MAX_FONT_FILE_SIZE - SIZE_SLACK)) {
                                                big_font_files = true;
@@ -258,7 +257,7 @@ void
 Hints::check_vob ()
 {
        int vob = 0;
-       BOOST_FOREACH (shared_ptr<const Content> i, film()->content()) {
+       for (auto i: film()->content()) {
                if (boost::algorithm::starts_with (i->path(0).filename().string(), "VTS_")) {
                        ++vob;
                }
@@ -274,7 +273,7 @@ void
 Hints::check_3d_in_2d ()
 {
        int three_d = 0;
-       BOOST_FOREACH (shared_ptr<const Content> i, film()->content()) {
+       for (auto i: film()->content()) {
                if (i->video && i->video->frame_type() != VIDEO_FRAME_TYPE_2D) {
                        ++three_d;
                }
@@ -403,8 +402,8 @@ Hints::thread ()
        dcp::DCP dcp (dcp_dir);
        dcp.read ();
        DCPOMATIC_ASSERT (dcp.cpls().size() == 1);
-       BOOST_FOREACH (shared_ptr<dcp::Reel> reel, dcp.cpls().front()->reels()) {
-               BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> ccap, reel->closed_captions()) {
+       for (auto reel: dcp.cpls().front()->reels()) {
+               for (auto ccap: reel->closed_captions()) {
                        if (ccap->asset() && ccap->asset()->xml_as_string().length() > static_cast<size_t>(MAX_CLOSED_CAPTION_XML_SIZE - SIZE_SLACK) && !ccap_xml_too_big) {
                                hint (_(
                                                "At least one of your closed caption files' XML part is larger than " MAX_CLOSED_CAPTION_XML_SIZE_TEXT
@@ -461,7 +460,7 @@ void
 Hints::closed_caption (PlayerText text, DCPTimePeriod period)
 {
        int lines = text.string.size();
-       BOOST_FOREACH (StringText i, text.string) {
+       for (auto i: text.string) {
                if (utf8_strlen(i.text()) > MAX_CLOSED_CAPTION_LENGTH) {
                        ++lines;
                        if (!_long_ccap) {
@@ -518,7 +517,7 @@ Hints::open_subtitle (PlayerText text, DCPTimePeriod period)
        }
 
        size_t longest_line = 0;
-       BOOST_FOREACH (StringText const& i, text.string) {
+       for (auto const& i: text.string) {
                longest_line = max (longest_line, i.text().length());
        }
 
index 20f32c0..517d679 100644 (file)
@@ -29,7 +29,6 @@
 #include "image_filename_sorter.h"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -163,7 +162,7 @@ ImageContent::still () const
 void
 ImageContent::set_default_colour_conversion ()
 {
-       BOOST_FOREACH (boost::filesystem::path i, paths()) {
+       for (auto i: paths()) {
                if (valid_j2k_file (i)) {
                        /* We default to no colour conversion if we have JPEG2000 files */
                        video->unset_colour_conversion ();
index 47f46e8..ea5f46d 100644 (file)
@@ -21,7 +21,6 @@
 #include "image_filename_sorter.h"
 #include <dcp/locale_convert.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <boost/optional.hpp>
 #include <iostream>
 
index 273bce8..acd2793 100644 (file)
@@ -37,7 +37,6 @@
 #include "encode_server_description.h"
 #include "compose.hpp"
 #include <libcxml/cxml.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -396,7 +395,7 @@ J2KEncoder::servers_list_changed ()
                }
        }
 
-       BOOST_FOREACH (EncodeServerDescription i, EncodeServerFinder::instance()->servers()) {
+       for (auto i: EncodeServerFinder::instance()->servers()) {
                if (!i.current_link_version()) {
                        continue;
                }
index 525f86b..f0d8fcb 100644 (file)
@@ -34,7 +34,6 @@
 #include <sub/exceptions.h>
 #include <boost/thread.hpp>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <iostream>
 
@@ -196,7 +195,7 @@ Job::run_wrapper ()
        } catch (sub::SubripError& e) {
 
                string extra = "Error is near:\n";
-               BOOST_FOREACH (string i, e.context()) {
+               for (auto i: e.context()) {
                        extra += i + "\n";
                }
 
index 358820c..1724879 100644 (file)
@@ -29,7 +29,6 @@
 #include "analyse_subtitles_job.h"
 #include "film.h"
 #include <boost/thread.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::string;
@@ -64,7 +63,7 @@ JobManager::~JobManager ()
 {
        boost::this_thread::disable_interruption dis;
 
-       BOOST_FOREACH (boost::signals2::connection& i, _connections) {
+       for (auto& i: _connections) {
                i.disconnect ();
        }
 
@@ -132,7 +131,7 @@ bool
 JobManager::errors () const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+       for (auto i: _jobs) {
                if (i->finished_in_error ()) {
                        return true;
                }
@@ -151,7 +150,7 @@ JobManager::scheduler ()
                while (true) {
                        bool have_new = false;
                        bool have_running = false;
-                       BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+                       for (auto i: _jobs) {
                                if (i->running()) {
                                        have_running = true;
                                }
@@ -171,7 +170,7 @@ JobManager::scheduler ()
                        break;
                }
 
-               BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+               for (auto i: _jobs) {
                        if (i->is_new()) {
                                _connections.push_back (i->FinishedImmediate.connect(bind(&JobManager::job_finished, this)));
                                i->start ();
@@ -226,7 +225,7 @@ JobManager::analyse_audio (
        {
                boost::mutex::scoped_lock lm (_mutex);
 
-               BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+               for (auto i: _jobs) {
                        shared_ptr<AnalyseAudioJob> a = dynamic_pointer_cast<AnalyseAudioJob> (i);
                        if (a && a->path() == film->audio_analysis_path(playlist) && !i->finished_cancelled()) {
                                i->when_finished (connection, ready);
@@ -261,7 +260,7 @@ JobManager::analyse_subtitles (
        {
                boost::mutex::scoped_lock lm (_mutex);
 
-               BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+               for (auto i: _jobs) {
                        shared_ptr<AnalyseSubtitlesJob> a = dynamic_pointer_cast<AnalyseSubtitlesJob> (i);
                        if (a && a->path() == film->subtitle_analysis_path(content)) {
                                i->when_finished (connection, ready);
@@ -315,7 +314,7 @@ JobManager::priority_changed ()
                boost::mutex::scoped_lock lm (_mutex);
 
                bool first = true;
-               BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+               for (auto i: _jobs) {
                        if (first) {
                                if (i->is_new ()) {
                                        i->start ();
@@ -366,7 +365,7 @@ JobManager::pause ()
                return;
        }
 
-       BOOST_FOREACH (shared_ptr<Job> i, _jobs) {
+       for (auto i: _jobs) {
                if (i->pause_by_user()) {
                        _paused_job = i;
                }
index 2747e41..92c95a4 100644 (file)
@@ -26,7 +26,6 @@
 #include "config.h"
 #include "dcpomatic_log.h"
 #include "emailer.h"
-#include <boost/foreach.hpp>
 #include <boost/function.hpp>
 #include <boost/function.hpp>
 
@@ -51,7 +50,7 @@ write_files (
 
        if (directory == "-") {
                /* Write KDMs to the stdout */
-               BOOST_FOREACH (KDMWithMetadataPtr i, kdms) {
+               for (auto i: kdms) {
                        cout << i->kdm_as_xml ();
                        ++written;
                }
@@ -64,7 +63,7 @@ write_files (
        }
 
        /* Write KDMs to the specified directory */
-       BOOST_FOREACH (KDMWithMetadataPtr i, kdms) {
+       for (auto i: kdms) {
                boost::filesystem::path out = directory / careful_string_filter(name_format.get(i->name_values(), ".xml"));
                if (!boost::filesystem::exists (out) || confirm_overwrite (out)) {
                        i->kdm_as_xml (out);
@@ -93,7 +92,7 @@ make_zip_file (list<KDMWithMetadataPtr> kdms, boost::filesystem::path zip_file,
 {
        Zipper zipper (zip_file);
 
-       BOOST_FOREACH (KDMWithMetadataPtr i, kdms) {
+       for (auto i: kdms) {
                string const name = careful_string_filter(name_format.get(i->name_values(), ".xml"));
                zipper.add (name, i->kdm_as_xml());
        }
@@ -110,7 +109,7 @@ collect (list<KDMWithMetadataPtr> kdms)
 {
        list<list<KDMWithMetadataPtr> > grouped;
 
-       BOOST_FOREACH (KDMWithMetadataPtr i, kdms) {
+       for (auto i: kdms) {
 
                list<list<KDMWithMetadataPtr> >::iterator j = grouped.begin ();
 
@@ -144,7 +143,7 @@ write_directories (
 {
        int written = 0;
 
-       BOOST_FOREACH (list<KDMWithMetadataPtr> const & i, kdms) {
+       for (auto const& i: kdms) {
                boost::filesystem::path path = directory;
                path /= container_name_format.get(i.front()->name_values(), "", "s");
                if (!boost::filesystem::exists (path) || confirm_overwrite (path)) {
@@ -170,7 +169,7 @@ write_zip_files (
 {
        int written = 0;
 
-       BOOST_FOREACH (list<KDMWithMetadataPtr> const & i, kdms) {
+       for (auto const& i: kdms) {
                boost::filesystem::path path = directory;
                path /= container_name_format.get(i.front()->name_values(), ".zip", "s");
                if (!boost::filesystem::exists (path) || confirm_overwrite (path)) {
@@ -208,7 +207,7 @@ email (
                throw NetworkError (_("No mail server configured in preferences"));
        }
 
-       BOOST_FOREACH (list<KDMWithMetadataPtr> const & i, kdms) {
+       for (auto const& i: kdms) {
 
                if (i.front()->emails().empty()) {
                        continue;
@@ -232,7 +231,7 @@ email (
                boost::algorithm::replace_all (body, "$CINEMA_NAME", i.front()->get('c').get_value_or(""));
 
                string screens;
-               BOOST_FOREACH (KDMWithMetadataPtr j, i) {
+               for (auto j: i) {
                        optional<string> screen_name = j->get('n');
                        if (screen_name) {
                                screens += *screen_name + ", ";
@@ -242,7 +241,7 @@ email (
 
                Emailer email (config->kdm_from(), i.front()->emails(), subject, body);
 
-               BOOST_FOREACH (string i, config->kdm_cc()) {
+               for (auto i: config->kdm_cc()) {
                        email.add_cc (i);
                }
                if (!config->kdm_bcc().empty ()) {
index f5ccd48..32801de 100644 (file)
@@ -21,7 +21,6 @@
 #include "overlaps.h"
 #include "types.h"
 #include "content.h"
-#include <boost/foreach.hpp>
 
 using std::shared_ptr;
 using boost::function;
@@ -31,7 +30,7 @@ ContentList overlaps (shared_ptr<const Film> film, ContentList cl, function<bool
 {
        ContentList overlaps;
        DCPTimePeriod period (from, to);
-       BOOST_FOREACH (shared_ptr<Content> i, cl) {
+       for (auto i: cl) {
                if (part(i) && DCPTimePeriod(i->position(), i->end(film)).overlap(period)) {
                        overlaps.push_back (i);
                }
index e6e8aca..503452b 100644 (file)
@@ -56,7 +56,6 @@
 #include <dcp/reel_subtitle_asset.h>
 #include <dcp/reel_picture_asset.h>
 #include <dcp/reel_closed_caption_asset.h>
-#include <boost/foreach.hpp>
 #include <stdint.h>
 #include <algorithm>
 #include <iostream>
@@ -177,7 +176,7 @@ Player::setup_pieces_unlocked ()
        _shuffler = new Shuffler();
        _shuffler->Video.connect(bind(&Player::video, this, _1, _2));
 
-       BOOST_FOREACH (shared_ptr<Content> i, playlist()->content()) {
+       for (auto i: playlist()->content()) {
 
                if (!i->paths_valid ()) {
                        continue;
@@ -189,7 +188,7 @@ Player::setup_pieces_unlocked ()
                }
 
                shared_ptr<Decoder> old_decoder;
-               BOOST_FOREACH (shared_ptr<Piece> j, old_pieces) {
+               for (auto j: old_pieces) {
                        if (j->content == i) {
                                old_decoder = j->decoder;
                                break;
@@ -210,7 +209,7 @@ Player::setup_pieces_unlocked ()
                }
 
                if (_ignore_text) {
-                       BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->text) {
+                       for (auto i: decoder->text) {
                                i->set_ignore (true);
                        }
                }
@@ -261,9 +260,9 @@ Player::setup_pieces_unlocked ()
        }
 
        _stream_states.clear ();
-       BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
+       for (auto i: _pieces) {
                if (i->content->audio) {
-                       BOOST_FOREACH (AudioStreamPtr j, i->content->audio->streams()) {
+                       for (auto j: i->content->audio->streams()) {
                                _stream_states[j] = StreamState (i, i->content->position ());
                        }
                }
@@ -454,7 +453,7 @@ Player::get_subtitle_fonts ()
        boost::mutex::scoped_lock lm (_mutex);
 
        vector<FontData> fonts;
-       BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
+       for (auto i: _pieces) {
                /* XXX: things may go wrong if there are duplicate font IDs
                   with different font files.
                */
@@ -535,7 +534,7 @@ Player::get_reel_assets ()
 
        list<ReferencedReelAsset> a;
 
-       BOOST_FOREACH (shared_ptr<Content> i, playlist()->content()) {
+       for (auto i: playlist()->content()) {
                shared_ptr<DCPContent> j = dynamic_pointer_cast<DCPContent> (i);
                if (!j) {
                        continue;
@@ -558,12 +557,12 @@ Player::get_reel_assets ()
                int64_t offset_from_start = 0;
                /* position in the asset from the end */
                int64_t offset_from_end = 0;
-               BOOST_FOREACH (shared_ptr<dcp::Reel> k, decoder->reels()) {
+               for (auto k: decoder->reels()) {
                        /* Assume that main picture duration is the length of the reel */
                        offset_from_end += k->main_picture()->actual_duration();
                }
 
-               BOOST_FOREACH (shared_ptr<dcp::Reel> k, decoder->reels()) {
+               for (auto k: decoder->reels()) {
 
                        /* Assume that main picture duration is the length of the reel */
                        int64_t const reel_duration = k->main_picture()->actual_duration();
@@ -586,7 +585,7 @@ Player::get_reel_assets ()
                        }
 
                        if (j->reference_text (TEXT_CLOSED_CAPTION)) {
-                               BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> l, k->closed_captions()) {
+                               for (auto l: k->closed_captions()) {
                                        maybe_add_asset (a, l, reel_trim_start, reel_trim_end, from, ffr);
                                }
                        }
@@ -621,7 +620,7 @@ Player::pass ()
        shared_ptr<Piece> earliest_content;
        optional<DCPTime> earliest_time;
 
-       BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
+       for (auto i: _pieces) {
                if (i->done) {
                        continue;
                }
@@ -765,13 +764,13 @@ Player::open_subtitles_for_frame (DCPTime time) const
        list<PositionImage> captions;
        int const vfr = _film->video_frame_rate();
 
-       BOOST_FOREACH (
-               PlayerText j,
+       for (
+               auto j:
                _active_texts[TEXT_OPEN_SUBTITLE].get_burnt(DCPTimePeriod(time, time + DCPTime::from_frames(1, vfr)), _always_burn_open_subtitles)
                ) {
 
                /* Bitmap subtitles */
-               BOOST_FOREACH (BitmapText i, j.bitmap) {
+               for (auto i: j.bitmap) {
                        if (!i.image) {
                                continue;
                        }
@@ -1034,7 +1033,7 @@ Player::plain_text_start (weak_ptr<Piece> wp, weak_ptr<const TextContent> wc, Co
                return;
        }
 
-       BOOST_FOREACH (dcp::SubtitleString s, subtitle.subs) {
+       for (auto s: subtitle.subs) {
                s.set_h_position (s.h_position() + text->x_offset ());
                s.set_v_position (s.v_position() + text->y_offset ());
                float const xs = text->x_scale();
@@ -1119,7 +1118,7 @@ Player::seek (DCPTime time, bool accurate)
                _active_texts[i].clear ();
        }
 
-       BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
+       for (auto i: _pieces) {
                if (time < i->content->position()) {
                        /* Before; seek to the start of the content.  Even if this request is for an inaccurate seek
                           we must seek this (following) content accurately, otherwise when we come to the end of the current
@@ -1274,7 +1273,7 @@ Player::content_time_to_dcp (shared_ptr<Content> content, ContentTime t)
 {
        boost::mutex::scoped_lock lm (_mutex);
 
-       BOOST_FOREACH (shared_ptr<Piece> i, _pieces) {
+       for (auto i: _pieces) {
                if (i->content == content) {
                        return content_time_to_dcp (i, t);
                }
index d2448ef..5456b06 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "player_text.h"
 #include "font.h"
-#include <boost/foreach.hpp>
 
 using std::list;
 using std::shared_ptr;
@@ -29,9 +28,9 @@ using namespace dcpomatic;
 void
 PlayerText::add_fonts (list<shared_ptr<Font> > fonts_)
 {
-       BOOST_FOREACH (shared_ptr<Font> i, fonts_) {
+       for (auto i: fonts_) {
                bool got = false;
-               BOOST_FOREACH (shared_ptr<Font> j, fonts) {
+               for (auto j: fonts) {
                        if (*i == *j) {
                                got = true;
                        }
index 287f23f..ab7649b 100644 (file)
@@ -35,7 +35,6 @@
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 #include <boost/bind/placeholders.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -138,7 +137,7 @@ Playlist::maybe_sequence (shared_ptr<const Film> film)
 
        DCPTime next_left;
        DCPTime next_right;
-       BOOST_FOREACH (shared_ptr<Content> i, cont) {
+       for (auto i: cont) {
                if (!i->video) {
                        continue;
                }
@@ -157,7 +156,7 @@ Playlist::maybe_sequence (shared_ptr<const Film> film)
        /* Captions */
 
        DCPTime next;
-       BOOST_FOREACH (shared_ptr<Content> i, cont) {
+       for (auto i: cont) {
                if (i->text.empty() || find (placed.begin(), placed.end(), i) != placed.end()) {
                        continue;
                }
@@ -177,9 +176,9 @@ Playlist::video_identifier () const
 {
        string t;
 
-       BOOST_FOREACH (shared_ptr<const Content> i, content()) {
+       for (auto i: content()) {
                bool burn = false;
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+               for (auto j: i->text) {
                        if (j->burn()) {
                                burn = true;
                        }
@@ -204,7 +203,7 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
 {
        boost::mutex::scoped_lock lm (_mutex);
 
-       BOOST_FOREACH (cxml::NodePtr i, node->node_children ("Content")) {
+       for (auto i: node->node_children ("Content")) {
                shared_ptr<Content> content = content_factory (i, version, notes);
 
                /* See if this content should be nudged to start on a video frame */
@@ -262,7 +261,7 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
 void
 Playlist::as_xml (xmlpp::Node* node, bool with_content_paths)
 {
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                i->as_xml (node->add_child ("Content"), with_content_paths);
        }
 }
@@ -325,7 +324,7 @@ Playlist::remove (ContentList c)
        {
                boost::mutex::scoped_lock lm (_mutex);
 
-               BOOST_FOREACH (shared_ptr<Content> i, c) {
+               for (auto i: c) {
                        ContentList::iterator j = _content.begin ();
                        while (j != _content.end() && *j != i) {
                                ++j;
@@ -366,12 +365,12 @@ Playlist::best_video_frame_rate () const
        list<FrameRateCandidate> candidates;
 
        /* Start with the ones without skip / repeat so they will get matched in preference to skipped/repeated ones */
-       BOOST_FOREACH (int i, allowed_dcp_frame_rates) {
+       for (auto i: allowed_dcp_frame_rates) {
                candidates.push_back (FrameRateCandidate(i, i));
        }
 
        /* Then the skip/repeat ones */
-       BOOST_FOREACH (int i, allowed_dcp_frame_rates) {
+       for (auto i: allowed_dcp_frame_rates) {
                candidates.push_back (FrameRateCandidate (float(i) / 2, i));
                candidates.push_back (FrameRateCandidate (float(i) * 2, i));
        }
@@ -383,7 +382,7 @@ Playlist::best_video_frame_rate () const
        while (i != candidates.end()) {
 
                float this_error = 0;
-               BOOST_FOREACH (shared_ptr<Content> j, content()) {
+               for (auto j: content()) {
                        if (!j->video || !j->video_frame_rate()) {
                                continue;
                        }
@@ -418,7 +417,7 @@ DCPTime
 Playlist::length (shared_ptr<const Film> film) const
 {
        DCPTime len;
-       BOOST_FOREACH (shared_ptr<const Content> i, content()) {
+       for (auto i: content()) {
                len = max (len, i->end(film));
        }
 
@@ -435,7 +434,7 @@ Playlist::start () const
        }
 
        DCPTime start = DCPTime::max ();
-       BOOST_FOREACH (shared_ptr<Content> i, cont) {
+       for (auto i: cont) {
                start = min (start, i->position ());
        }
 
@@ -446,7 +445,7 @@ Playlist::start () const
 void
 Playlist::disconnect ()
 {
-       BOOST_FOREACH (boost::signals2::connection& i, _content_connections) {
+       for (auto& i: _content_connections) {
                i.disconnect ();
        }
 
@@ -459,7 +458,7 @@ Playlist::reconnect (shared_ptr<const Film> film)
 {
        disconnect ();
 
-       BOOST_FOREACH (shared_ptr<Content> i, _content) {
+       for (auto i: _content) {
                _content_connections.push_back (i->Change.connect(boost::bind(&Playlist::content_change, this, film, _1, _2, _3, _4)));
        }
 }
@@ -468,7 +467,7 @@ DCPTime
 Playlist::video_end (shared_ptr<const Film> film) const
 {
        DCPTime end;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                if (i->video) {
                        end = max (end, i->end(film));
                }
@@ -481,7 +480,7 @@ DCPTime
 Playlist::text_end (shared_ptr<const Film> film) const
 {
        DCPTime end;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                if (!i->text.empty ()) {
                        end = max (end, i->end(film));
                }
@@ -552,7 +551,7 @@ void
 Playlist::repeat (shared_ptr<const Film> film, ContentList c, int n)
 {
        pair<DCPTime, DCPTime> range (DCPTime::max (), DCPTime ());
-       BOOST_FOREACH (shared_ptr<Content> i, c) {
+       for (auto i: c) {
                range.first = min (range.first, i->position ());
                range.second = max (range.second, i->position ());
                range.first = min (range.first, i->end(film));
@@ -566,7 +565,7 @@ Playlist::repeat (shared_ptr<const Film> film, ContentList c, int n)
 
                DCPTime pos = range.second;
                for (int i = 0; i < n; ++i) {
-                       BOOST_FOREACH (shared_ptr<Content> j, c) {
+                       for (auto j: c) {
                                shared_ptr<Content> copy = j->clone ();
                                copy->set_position (film, pos + copy->position() - range.first);
                                _content.push_back (copy);
@@ -634,7 +633,7 @@ Playlist::required_disk_space (shared_ptr<const Film> film, int j2k_bandwidth, i
        int64_t video = uint64_t (j2k_bandwidth / 8) * length(film).seconds();
        int64_t audio = uint64_t (audio_channels * audio_frame_rate * 3) * length(film).seconds();
 
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent> (i);
                if (d) {
                        if (d->reference_video()) {
@@ -655,7 +654,7 @@ Playlist::content_summary (shared_ptr<const Film> film, DCPTimePeriod period) co
 {
        string best_summary;
        int best_score = -1;
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                int score = 0;
                optional<DCPTimePeriod> const o = DCPTimePeriod(i->position(), i->end(film)).overlap (period);
                if (o) {
@@ -680,7 +679,7 @@ Playlist::speed_up_range (int dcp_video_frame_rate) const
 {
        pair<double, double> range (DBL_MAX, -DBL_MAX);
 
-       BOOST_FOREACH (shared_ptr<Content> i, content()) {
+       for (auto i: content()) {
                if (!i->video) {
                        continue;
                }
index 110102b..b81c225 100644 (file)
@@ -51,7 +51,6 @@
 #include <dcp/smpte_subtitle_asset.h>
 #include <dcp/raw_convert.h>
 #include <dcp/subtitle_image.h>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -179,7 +178,7 @@ ReelWriter::ReelWriter (
                DCPOMATIC_ASSERT (film()->directory());
 
                vector<dcp::Channel> active;
-               BOOST_FOREACH (int i, film()->mapped_audio_channels()) {
+               for (auto i: film()->mapped_audio_channels()) {
                        active.push_back (static_cast<dcp::Channel>(i));
                }
 
@@ -460,7 +459,7 @@ maybe_add_text (
 
        if (asset) {
                /* Add the font to the subtitle content */
-               BOOST_FOREACH (FontData const& j, fonts) {
+               for (auto const& j: fonts) {
                        asset->add_font (j.id, j.data.get_value_or(default_font));
                }
 
@@ -491,7 +490,7 @@ maybe_add_text (
                        );
        } else {
                /* We don't have a subtitle asset of our own; hopefully we have one to reference */
-               BOOST_FOREACH (ReferencedReelAsset j, refs) {
+               for (auto j: refs) {
                        shared_ptr<T> k = dynamic_pointer_cast<T> (j.asset);
                        if (k && j.period == period) {
                                reel_asset = k;
@@ -536,7 +535,7 @@ ReelWriter::create_reel_picture (shared_ptr<dcp::Reel> reel, list<ReferencedReel
        } else {
                LOG_GENERAL ("no picture asset of our own; look through %1", refs.size());
                /* We don't have a picture asset of our own; hopefully we have one to reference */
-               BOOST_FOREACH (ReferencedReelAsset j, refs) {
+               for (auto j: refs) {
                        shared_ptr<dcp::ReelPictureAsset> k = dynamic_pointer_cast<dcp::ReelPictureAsset> (j.asset);
                        if (k) {
                                LOG_GENERAL ("candidate picture asset period is %1-%2", j.period.from.get(), j.period.to.get());
@@ -578,7 +577,7 @@ ReelWriter::create_reel_sound (shared_ptr<dcp::Reel> reel, list<ReferencedReelAs
        } else {
                LOG_GENERAL ("no sound asset of our own; look through %1", refs.size());
                /* We don't have a sound asset of our own; hopefully we have one to reference */
-               BOOST_FOREACH (ReferencedReelAsset j, refs) {
+               for (auto j: refs) {
                        shared_ptr<dcp::ReelSoundAsset> k = dynamic_pointer_cast<dcp::ReelSoundAsset> (j.asset);
                        if (k) {
                                LOG_GENERAL ("candidate sound asset period is %1-%2", j.period.from.get(), j.period.to.get());
@@ -664,7 +663,7 @@ ReelWriter::create_reel_text (
        }
 
        /* Make empty tracks for anything we've been asked to ensure but that we haven't added */
-       BOOST_FOREACH (DCPTextTrack i, ensure_closed_captions) {
+       for (auto i: ensure_closed_captions) {
                shared_ptr<dcp::ReelClosedCaptionAsset> a = maybe_add_text<dcp::ReelClosedCaptionAsset> (
                        empty_text_asset(TEXT_CLOSED_CAPTION, i), duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
                        );
@@ -847,14 +846,14 @@ ReelWriter::write (PlayerText subs, TextType type, optional<DCPTextTrack> track,
                DCPOMATIC_ASSERT (false);
        }
 
-       BOOST_FOREACH (StringText i, subs.string) {
+       for (auto i: subs.string) {
                /* XXX: couldn't / shouldn't we use period here rather than getting time from the subtitle? */
                i.set_in  (i.in()  - dcp::Time (_period.from.seconds(), i.in().tcr));
                i.set_out (i.out() - dcp::Time (_period.from.seconds(), i.out().tcr));
                asset->add (shared_ptr<dcp::Subtitle>(new dcp::SubtitleString(i)));
        }
 
-       BOOST_FOREACH (BitmapText i, subs.bitmap) {
+       for (auto i: subs.bitmap) {
                asset->add (
                        shared_ptr<dcp::Subtitle>(
                                new dcp::SubtitleImage(
index 3129c22..3dc1e9f 100644 (file)
@@ -36,7 +36,6 @@ DCPOMATIC_ENABLE_WARNINGS
 #ifndef DCPOMATIC_HAVE_SHOW_IN_CAIRO_CONTEXT
 #include <pango/pangocairo.h>
 #endif
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 
@@ -61,7 +60,7 @@ marked_up (list<StringText> subtitles, int target_height, float fade_factor)
 {
        string out;
 
-       BOOST_FOREACH (StringText const & i, subtitles) {
+       for (auto const& i: subtitles) {
                out += "<span ";
                if (i.italic()) {
                        out += "style=\"italic\" ";
@@ -142,7 +141,7 @@ setup_font (StringText const& subtitle, list<shared_ptr<Font> > const& fonts)
 
        optional<boost::filesystem::path> font_file = default_font_file ();
 
-       BOOST_FOREACH (shared_ptr<Font> i, fonts) {
+       for (auto i: fonts) {
                if (i->id() == subtitle.font() && i->file()) {
                        font_file = i->file ();
                }
@@ -404,7 +403,7 @@ render_text (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Siz
        list<StringText> pending;
        list<PositionImage> images;
 
-       BOOST_FOREACH (StringText const & i, subtitles) {
+       for (auto const& i: subtitles) {
                if (!pending.empty() && (i.v_align() != pending.back().v_align() || fabs(i.v_position() - pending.back().v_position()) > 1e-4)) {
                        images.push_back (render_line (pending, fonts, target, time, frame_rate));
                        pending.clear ();
index dea513a..8e1e83e 100644 (file)
@@ -23,7 +23,6 @@
 #include "film.h"
 #include "cinema.h"
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/date_time/posix_time/posix_time.hpp>
 
@@ -37,7 +36,7 @@ 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<string>
 Screen::trusted_device_thumbprints () const
 {
        vector<string> t;
-       BOOST_FOREACH (TrustedDevice i, trusted_devices) {
+       for (auto i: trusted_devices) {
                t.push_back (i.thumbprint());
        }
        return t;
index cea35e3..8ed08f2 100644 (file)
@@ -42,7 +42,7 @@ SendKDMEmailJob::SendKDMEmailJob (
        , _filename_format (filename_format)
        , _cpl_name (cpl_name)
 {
-       BOOST_FOREACH (KDMWithMetadataPtr i, kdms) {
+       for (auto i: kdms) {
                list<KDMWithMetadataPtr> s;
                s.push_back (i);
                _kdms.push_back (s);
index 41d215b..e5edc49 100644 (file)
@@ -23,7 +23,6 @@
 #include "config.h"
 #include "emailer.h"
 #include "compose.hpp"
-#include <boost/foreach.hpp>
 #include <list>
 
 #include "i18n.h"
@@ -70,7 +69,7 @@ SendNotificationEmailJob::run ()
        list<string> to;
        to.push_back (config->notification_to ());
        Emailer email (config->notification_from(), to, config->notification_subject(), _body);
-       BOOST_FOREACH (string i, config->notification_cc()) {
+       for (auto i: config->notification_cc()) {
                email.add_cc (i);
        }
        if (!config->notification_bcc().empty()) {
index 143baaa..cff1c8e 100644 (file)
@@ -28,7 +28,6 @@
 #include "emailer.h"
 #include "environment_info.h"
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -83,7 +82,7 @@ SendProblemReportJob::run ()
 
        body += "Version: " + string (dcpomatic_version) + " " + string (dcpomatic_git_commit) + "\n\n";
 
-       BOOST_FOREACH (string i, environment_info ()) {
+       for (auto i: environment_info ()) {
                body += i + "\n";
        }
 
index 2689fb8..0e478a5 100644 (file)
@@ -22,7 +22,6 @@
 #include "content_video.h"
 #include "dcpomatic_assert.h"
 #include "dcpomatic_log.h"
-#include <boost/foreach.hpp>
 #include <string>
 #include <iostream>
 
@@ -115,8 +114,7 @@ Shuffler::clear ()
 void
 Shuffler::flush ()
 {
-       BOOST_FOREACH (Store i, _store) {
-               LOG_DEBUG_PLAYER("Flushing %1 from shuffler", i.second.frame);
+       for (auto i: _store) {
                Video (i.first, i.second);
        }
 }
index 512fe25..1677e62 100644 (file)
@@ -26,7 +26,6 @@
 DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -43,7 +42,7 @@ SPL::read (boost::filesystem::path path, ContentStore* store)
        doc.read_file (path);
        _id = doc.string_child("Id");
        _name = doc.string_child("Name");
-       BOOST_FOREACH (cxml::ConstNodePtr i, doc.node_children("Entry")) {
+       for (auto i: doc.node_children("Entry")) {
                shared_ptr<Content> c = store->get(i->string_child("Digest"));
                if (c) {
                        add (SPLEntry(c));
@@ -60,7 +59,7 @@ SPL::write (boost::filesystem::path path) const
        xmlpp::Element* root = doc.create_root_node ("SPL");
        root->add_child("Id")->add_child_text (_id);
        root->add_child("Name")->add_child_text (_name);
-       BOOST_FOREACH (SPLEntry i, _spl) {
+       for (auto i: _spl) {
                i.as_xml (root->add_child("Entry"));
        }
        doc.write_to_file_formatted (path.string());
index 415851a..f241478 100644 (file)
@@ -23,7 +23,6 @@
 #include "text_content.h"
 #include "text_decoder.h"
 #include <dcp/subtitle_string.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::list;
@@ -95,8 +94,8 @@ vector<FontData>
 StringTextFileDecoder::fonts () const
 {
        vector<FontData> data;
-       BOOST_FOREACH (shared_ptr<TextDecoder> i, text) {
-               BOOST_FOREACH (shared_ptr<Font> j, i->content()->fonts()) {
+       for (auto i: text) {
+               for (auto j: i->content()->fonts()) {
                        data.push_back (FontData(j));
                }
        }
index 1a83c5c..cc42f12 100644 (file)
@@ -77,7 +77,7 @@ SubtitleEncoder::SubtitleEncoder (shared_ptr<const Film> film, shared_ptr<Job> j
                _assets.push_back (make_pair(shared_ptr<dcp::SubtitleAsset>(), boost::filesystem::change_extension(filename, extension)));
        }
 
-       BOOST_FOREACH (dcpomatic::DCPTimePeriod i, film->reels()) {
+       for (auto i: film->reels()) {
                _reels.push_back (i);
        }
 
@@ -115,7 +115,7 @@ SubtitleEncoder::go ()
                }
 
                if (!_film->interop() || _include_font) {
-                       BOOST_FOREACH (dcpomatic::FontData j, _player->get_subtitle_fonts()) {
+                       for (auto j: _player->get_subtitle_fonts()) {
                                i->first->add_font (j.id, _default_font);
                        }
                }
@@ -162,7 +162,7 @@ SubtitleEncoder::text (PlayerText subs, TextType type, optional<DCPTextTrack> tr
                }
        }
 
-       BOOST_FOREACH (StringText i, subs.string) {
+       for (auto i: subs.string) {
                /* XXX: couldn't / shouldn't we use period here rather than getting time from the subtitle? */
                i.set_in  (i.in());
                i.set_out (i.out());
index 656aec7..2f01bb2 100644 (file)
@@ -26,7 +26,6 @@
 #include <dcp/raw_convert.h>
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
@@ -105,7 +104,7 @@ TextContent::from_xml (Content* parent, cxml::ConstNodePtr node, int version)
        }
 
        list<shared_ptr<TextContent> > c;
-       BOOST_FOREACH (cxml::ConstNodePtr i, node->node_children("Text")) {
+       for (auto i: node->node_children("Text")) {
                c.push_back (shared_ptr<TextContent> (new TextContent (parent, i, version)));
        }
 
@@ -397,7 +396,7 @@ TextContent::identifier () const
        /* XXX: I suppose really _fonts shouldn't be in here, since not all
           types of subtitle content involve fonts.
        */
-       BOOST_FOREACH (shared_ptr<Font> f, _fonts) {
+       for (auto f: _fonts) {
                s += "_" + f->file().get_value_or("Default").string();
        }
 
@@ -416,13 +415,13 @@ TextContent::add_font (shared_ptr<Font> font)
 void
 TextContent::connect_to_fonts ()
 {
-       BOOST_FOREACH (boost::signals2::connection& i, _font_connections) {
+       for (auto const& i: _font_connections) {
                i.disconnect ();
        }
 
        _font_connections.clear ();
 
-       BOOST_FOREACH (shared_ptr<Font> i, _fonts) {
+       for (auto i: _fonts) {
                _font_connections.push_back (i->Changed.connect (boost::bind (&TextContent::font_changed, this)));
        }
 }
index 3f6afd7..a2241c5 100644 (file)
@@ -24,7 +24,6 @@
 #include "log.h"
 #include "compose.hpp"
 #include <sub/subtitle.h>
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 
@@ -67,7 +66,7 @@ TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr<Image> image, dcpom
 void
 TextDecoder::emit_plain_start (ContentTime from, list<dcp::SubtitleString> s)
 {
-       BOOST_FOREACH (dcp::SubtitleString& i, s) {
+       for (auto& i: s) {
                /* We must escape < and > in strings, otherwise they might confuse our subtitle
                   renderer (which uses some HTML-esque markup to do bold/italic etc.)
                */
@@ -104,7 +103,7 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
        /* See if our next subtitle needs to be vertically placed on screen by us */
        bool needs_placement = false;
        optional<int> bottom_line;
-       BOOST_FOREACH (sub::Line i, subtitle.lines) {
+       for (auto i: subtitle.lines) {
                if (!i.vertical_position.reference || (i.vertical_position.line && !i.vertical_position.lines) || i.vertical_position.reference.get() == sub::TOP_OF_SUBTITLE) {
                        needs_placement = true;
                        if (!bottom_line || bottom_line.get() < i.vertical_position.line.get()) {
@@ -115,7 +114,7 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
 
        /* Find the lowest proportional position */
        optional<float> lowest_proportional;
-       BOOST_FOREACH (sub::Line i, subtitle.lines) {
+       for (auto i: subtitle.lines) {
                if (i.vertical_position.proportional) {
                        if (!lowest_proportional) {
                                lowest_proportional = i.vertical_position.proportional;
@@ -126,8 +125,8 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle)
        }
 
        list<dcp::SubtitleString> out;
-       BOOST_FOREACH (sub::Line i, subtitle.lines) {
-               BOOST_FOREACH (sub::Block j, i.blocks) {
+       for (auto i: subtitle.lines) {
+               for (auto j: i.blocks) {
 
                        if (!j.font_size.specified()) {
                                /* Fallback default font size if no other has been specified */
index 6729628..68d97b8 100644 (file)
@@ -31,7 +31,6 @@ DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
 #include <libcxml/cxml.h>
-#include <boost/foreach.hpp>
 
 #include "i18n.h"
 
@@ -200,7 +199,7 @@ CPLSummary::CPLSummary (boost::filesystem::path p)
 
        list<dcp::VerificationNote> notes;
        dcp.read (&notes);
-       BOOST_FOREACH (dcp::VerificationNote i, notes) {
+       for (auto i: notes) {
                if (i.code() != dcp::VerificationNote::EXTERNAL_ASSET) {
                        /* It's not just a warning about this DCP being a VF */
                        throw dcp::ReadError(dcp::note_to_string(i));
@@ -212,8 +211,8 @@ CPLSummary::CPLSummary (boost::filesystem::path p)
        cpl_file = dcp.cpls().front()->file().get();
 
        encrypted = false;
-       BOOST_FOREACH (shared_ptr<dcp::CPL> j, dcp.cpls()) {
-               BOOST_FOREACH (shared_ptr<const dcp::ReelMXF> k, j->reel_mxfs()) {
+       for (auto j: dcp.cpls()) {
+               for (auto k: j->reel_mxfs()) {
                        if (k->key_id()) {
                                encrypted = true;
                        }
index 45b517c..c7b3281 100644 (file)
@@ -810,7 +810,7 @@ audio_channel_types (list<int> mapped, int channels)
        int non_lfe = 0;
        int lfe = 0;
 
-       BOOST_FOREACH (int i, mapped) {
+       for (auto i: mapped) {
                if (i >= channels) {
                        /* This channel is mapped but is not included in the DCP */
                        continue;
@@ -1007,7 +1007,7 @@ show_jobs_on_console (bool progress)
 
                first = false;
 
-               BOOST_FOREACH (shared_ptr<Job> i, jobs) {
+               for (auto i: jobs) {
                        if (progress) {
                                cout << i->name();
                                if (!i->sub_name().empty()) {
@@ -1135,7 +1135,7 @@ decrypt_kdm_with_helpful_error (dcp::EncryptedKDM kdm)
                string const kdm_subject_name = kdm.recipient_x509_subject_name();
                bool on_chain = false;
                shared_ptr<const dcp::CertificateChain> dc = Config::instance()->decryption_chain();
-               BOOST_FOREACH (dcp::Certificate i, dc->root_to_leaf()) {
+               for (auto i: dc->root_to_leaf()) {
                        if (i.subject() == kdm_subject_name) {
                                on_chain = true;
                        }
index 564e376..ceb3070 100644 (file)
@@ -128,7 +128,7 @@ std::list<T>
 vector_to_list (std::vector<T> v)
 {
        std::list<T> l;
-       BOOST_FOREACH (T& i, v) {
+       for (auto& i: v) {
                l.push_back (i);
        }
        return l;
@@ -139,7 +139,7 @@ std::vector<T>
 list_to_vector (std::list<T> v)
 {
        std::vector<T> l;
-       BOOST_FOREACH (T& i, v) {
+       for (auto& i: v) {
                l.push_back (i);
        }
        return l;
index 88e44c4..bbcce72 100644 (file)
@@ -71,7 +71,7 @@ VerifyDCPJob::run ()
        _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), xsd_path());
 
        bool failed = false;
-       BOOST_FOREACH (dcp::VerificationNote i, _notes) {
+       for (auto i: _notes) {
                if (i.type() == dcp::VerificationNote::VERIFY_ERROR) {
                        failed = true;
                }
index 5bf0672..cab8197 100644 (file)
@@ -25,7 +25,6 @@
 #include "log.h"
 #include "frame_interval_checker.h"
 #include "compose.hpp"
-#include <boost/foreach.hpp>
 #include <iostream>
 
 #include "i18n.h"
index 1c08d44..8c73aba 100644 (file)
@@ -21,7 +21,6 @@
 #include "video_ring_buffers.h"
 #include "player_video.h"
 #include "compose.hpp"
-#include <boost/foreach.hpp>
 #include <list>
 #include <iostream>
 
index ff2adeb..8c5a824 100644 (file)
@@ -39,7 +39,6 @@
 #include <dcp/cpl.h>
 #include <dcp/locale_convert.h>
 #include <dcp/reel_mxf.h>
-#include <boost/foreach.hpp>
 #include <fstream>
 #include <cerrno>
 #include <iostream>
@@ -101,7 +100,7 @@ Writer::Writer (weak_ptr<const Film> weak_film, weak_ptr<Job> j, bool text_only)
 
        int reel_index = 0;
        list<DCPTimePeriod> const reels = film()->reels();
-       BOOST_FOREACH (DCPTimePeriod p, reels) {
+       for (auto p: reels) {
                _reels.push_back (ReelWriter(weak_film, p, job, reel_index++, reels.size(), text_only));
        }
 
@@ -112,7 +111,7 @@ Writer::Writer (weak_ptr<const Film> weak_film, weak_ptr<Job> j, bool text_only)
        */
        _audio_reel = _reels.begin ();
        _subtitle_reel = _reels.begin ();
-       BOOST_FOREACH (DCPTextTrack i, film()->closed_caption_tracks()) {
+       for (auto i: film()->closed_caption_tracks()) {
                _caption_reels[i] = _reels.begin ();
        }
        _atmos_reel = _reels.begin ();
@@ -413,7 +412,7 @@ try
                        /* (Hopefully temporarily) log anything that was not written */
                        if (!_queue.empty() && !have_sequenced_image_at_queue_head()) {
                                LOG_WARNING (N_("Finishing writer with a left-over queue of %1:"), _queue.size());
-                               BOOST_FOREACH (QueueItem const& i, _queue) {
+                               for (auto const& i: _queue) {
                                        if (i.type == QueueItem::FULL) {
                                                LOG_WARNING (N_("- type FULL, frame %1, eyes %2"), i.frame, (int) i.eyes);
                                        } else {
@@ -537,7 +536,7 @@ Writer::finish (boost::filesystem::path output_dcp)
 
        LOG_GENERAL_NC ("Finishing ReelWriters");
 
-       BOOST_FOREACH (ReelWriter& i, _reels) {
+       for (auto& i: _reels) {
                i.finish (output_dcp);
        }
 
@@ -579,7 +578,7 @@ Writer::finish (boost::filesystem::path output_dcp)
                set_progress = &ignore_progress;
        }
 
-       BOOST_FOREACH (ReelWriter& i, _reels) {
+       for (auto& i: _reels) {
                service.post (boost::bind (&ReelWriter::calculate_digests, &i, set_progress));
        }
        service.post (boost::bind (&Writer::calculate_referenced_digests, this, set_progress));
@@ -590,7 +589,7 @@ Writer::finish (boost::filesystem::path output_dcp)
 
        /* Add reels */
 
-       BOOST_FOREACH (ReelWriter& i, _reels) {
+       for (auto& i: _reels) {
                cpl->add (i.create_reel(_reel_assets, _fonts, output_dcp, _have_subtitles, _have_closed_captions));
        }
 
@@ -609,7 +608,7 @@ Writer::finish (boost::filesystem::path output_dcp)
        cpl->set_ratings (film()->ratings());
 
        vector<dcp::ContentVersion> cv;
-       BOOST_FOREACH (string i, film()->content_versions()) {
+       for (auto i: film()->content_versions()) {
                cv.push_back (dcp::ContentVersion(i));
        }
        cpl->set_content_versions (cv);
@@ -631,7 +630,7 @@ Writer::finish (boost::filesystem::path output_dcp)
                ) ? dcp::SEVEN_POINT_ONE : dcp::FIVE_POINT_ONE;
 
        dcp::MainSoundConfiguration msc (field, film()->audio_channels());
-       BOOST_FOREACH (int i, ac) {
+       for (auto i: ac) {
                if (i < film()->audio_channels()) {
                        msc.set_mapping (i, static_cast<dcp::Channel>(i));
                }
@@ -796,9 +795,9 @@ Writer::write (vector<FontData> fonts)
 {
        /* Just keep a list of unique fonts and we'll deal with them in ::finish */
 
-       BOOST_FOREACH (FontData const& i, fonts) {
+       for (auto const& i: fonts) {
                bool got = false;
-               BOOST_FOREACH (FontData const& j, _fonts) {
+               for (auto& j: _fonts) {
                        if (i == j) {
                                got = true;
                        }
@@ -879,7 +878,7 @@ Writer::set_digest_progress (Job* job, float progress)
 void
 Writer::calculate_referenced_digests (boost::function<void (float)> set_progress)
 {
-       BOOST_FOREACH (ReferencedReelAsset const& i, _reel_assets) {
+       for (auto const& i: _reel_assets) {
                shared_ptr<dcp::ReelMXF> mxf = dynamic_pointer_cast<dcp::ReelMXF>(i.asset);
                if (mxf && !mxf->hash()) {
                        mxf->asset_ref().asset()->hash (set_progress);
index 386e40c..bcef19f 100644 (file)
@@ -103,7 +103,6 @@ DCPOMATIC_ENABLE_WARNINGS
 #endif
 #include <boost/filesystem.hpp>
 #include <boost/noncopyable.hpp>
-#include <boost/foreach.hpp>
 #include <boost/algorithm/string.hpp>
 #include <iostream>
 #include <fstream>
@@ -445,7 +444,7 @@ public:
                                );
                }
 
-               BOOST_FOREACH (string i, notes) {
+               for (auto i: notes) {
                        error_dialog (0, std_to_wx(i));
                }
 
@@ -687,7 +686,7 @@ private:
 
                PasteDialog* d = new PasteDialog (this, static_cast<bool>(_clipboard->video), static_cast<bool>(_clipboard->audio), !_clipboard->text.empty());
                if (d->ShowModal() == wxID_OK) {
-                       BOOST_FOREACH (shared_ptr<Content> i, _film_editor->content_panel()->selected()) {
+                       for (auto i: _film_editor->content_panel()->selected()) {
                                if (d->video() && i->video) {
                                        DCPOMATIC_ASSERT (_clipboard->video);
                                        i->video->take_settings_from (_clipboard->video);
@@ -1638,7 +1637,7 @@ private:
                        if (!_film_to_create.empty ()) {
                                _frame->new_film (_film_to_create, optional<string> ());
                                if (!_content_to_add.empty ()) {
-                                       BOOST_FOREACH (shared_ptr<Content> i, content_factory(_content_to_add)) {
+                                       for (auto i: content_factory(_content_to_add)) {
                                                _frame->film()->examine_and_add_content (i);
                                        }
                                }
index 46c66d2..9cb6ddc 100644 (file)
@@ -40,7 +40,6 @@
 #include <wx/splash.h>
 #include <wx/preferences.h>
 #include <wx/wx.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 #include <set>
 
@@ -179,13 +178,13 @@ public:
 
                        set<shared_ptr<const Film> > films;
 
-                       BOOST_FOREACH (shared_ptr<Job> i, JobManager::instance()->get()) {
+                       for (auto i: JobManager::instance()->get()) {
                                films.insert (i->film());
                        }
 
-                       BOOST_FOREACH (shared_ptr<const Film> i, films) {
+                       for (auto i: films) {
                                double progress = 0;
-                               BOOST_FOREACH (shared_ptr<Job> j, JobManager::instance()->get()) {
+                               for (auto j: JobManager::instance()->get()) {
                                        if (i == j->film() && dynamic_pointer_cast<TranscodeJob>(j)) {
                                                progress = j->progress().get_value_or(0);
                                        }
@@ -438,7 +437,7 @@ class App : public wxApp
                this->Bind (wxEVT_IDLE, boost::bind (&App::idle, this));
 
                shared_ptr<Film> film;
-               BOOST_FOREACH (boost::filesystem::path i, films_to_load) {
+               for (auto i: films_to_load) {
                        if (boost::filesystem::is_directory (i)) {
                                try {
                                        film.reset (new Film (i));
index 2d70fb5..46ae790 100644 (file)
@@ -35,7 +35,6 @@
 #include "lib/audio_content.h"
 #include "lib/dcpomatic_log.h"
 #include <dcp/version.h>
-#include <boost/foreach.hpp>
 #include <getopt.h>
 #include <iostream>
 #include <iomanip>
@@ -82,7 +81,7 @@ print_dump (shared_ptr<Film> film)
             << "Output " << film->video_frame_rate() << "fps " << (film->three_d() ? "3D" : "2D") << " " << (film->audio_frame_rate() / 1000) << "kHz\n"
             << (film->interop() ? "Inter-Op" : "SMPTE") << " " << (film->encrypted() ? "encrypted" : "unencrypted") << "\n";
 
-       BOOST_FOREACH (shared_ptr<Content> c, film->content ()) {
+       for (auto c: film->content()) {
                cout << "\n"
                     << c->path(0) << "\n"
                     << "\tat " << c->position().seconds ()
@@ -140,7 +139,7 @@ list_servers ()
                        ++N;
 
                        /* Report the state of configured servers */
-                       BOOST_FOREACH (string i, Config::instance()->servers()) {
+                       for (auto i: Config::instance()->servers()) {
                                cout << std::left << setw(24) << i << " ";
 
                                /* See if this server is on the active list; if so, remove it and note
@@ -168,7 +167,7 @@ list_servers ()
                        }
 
                        /* Now report any left that have been found by broadcast */
-                       BOOST_FOREACH (EncodeServerDescription const & i, servers) {
+                       for (auto const& i: servers) {
                                if (i.current_link_version()) {
                                        cout << std::left << setw(24) << i.host_name() << " UP     " << i.threads() << "\n";
                                } else {
index 568dfa5..1d3387f 100644 (file)
@@ -38,7 +38,6 @@
 #include <dcp/exceptions.h>
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <getopt.h>
 #include <string>
 #include <iostream>
@@ -111,7 +110,7 @@ main (int argc, char* argv[])
                        film->set_j2k_bandwidth (*cc.j2k_bandwidth);
                }
 
-               BOOST_FOREACH (CreateCLI::Content i, cc.content) {
+               for (auto i: cc.content) {
                        boost::filesystem::path const can = boost::filesystem::canonical (i.path);
                        list<shared_ptr<Content> > content;
 
@@ -122,7 +121,7 @@ main (int argc, char* argv[])
                                content = content_factory (can);
                        }
 
-                       BOOST_FOREACH (shared_ptr<Content> j, content) {
+                       for (auto j: content) {
                                film->examine_and_add_content (j);
                        }
 
@@ -132,7 +131,7 @@ main (int argc, char* argv[])
 
                        while (signal_manager->ui_idle() > 0) {}
 
-                       BOOST_FOREACH (shared_ptr<Content> j, content) {
+                       for (auto j: content) {
                                if (j->video) {
                                        j->video->set_frame_type (i.frame_type);
                                }
@@ -143,7 +142,7 @@ main (int argc, char* argv[])
                        film->set_video_frame_rate (*cc.dcp_frame_rate);
                }
 
-               BOOST_FOREACH (shared_ptr<Content> i, film->content()) {
+               for (auto i: film->content()) {
                        shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
                        if (ic && ic->still()) {
                                ic->video->set_length (cc.still_length * 24);
@@ -151,7 +150,7 @@ main (int argc, char* argv[])
                }
 
                if (jm->errors ()) {
-                       BOOST_FOREACH (shared_ptr<Job> i, jm->get()) {
+                       for (auto i: jm->get()) {
                                if (i->finished_in_error()) {
                                        cerr << i->error_summary() << "\n"
                                             << i->error_details() << "\n";
index ac0bb68..17a24d4 100644 (file)
@@ -317,7 +317,7 @@ private:
                int re_select = wxNOT_FOUND;
                int j = 0;
                _drives = Drive::get ();
-               BOOST_FOREACH (Drive i, _drives) {
+               for (auto i: _drives) {
                        wxString const s = std_to_wx(i.description());
                        if (s == current) {
                                re_select = j;
index 695a0b0..6c4221d 100644 (file)
@@ -64,7 +64,6 @@ DCPOMATIC_ENABLE_WARNINGS
 #include <sys/types.h>
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cin;
index 874573c..3547d0f 100644 (file)
@@ -59,7 +59,6 @@ DCPOMATIC_ENABLE_WARNINGS
 #include <ApplicationServices/ApplicationServices.h>
 #endif
 #include <boost/bind/bind.hpp>
-#include <boost/foreach.hpp>
 
 #ifdef check
 #undef check
@@ -321,7 +320,7 @@ private:
                                        throw InvalidSignerError ();
                                }
 
-                               BOOST_FOREACH (shared_ptr<Screen> i, _screens->screens()) {
+                               for (auto i: _screens->screens()) {
 
                                        if (!i->recipient) {
                                                continue;
@@ -340,7 +339,7 @@ private:
                                                );
 
                                        /* Add keys from the DKDM */
-                                       BOOST_FOREACH (dcp::DecryptedKDMKey const & j, decrypted.keys()) {
+                                       for (auto const& j: decrypted.keys()) {
                                                kdm.add_key (j);
                                        }
 
@@ -522,7 +521,7 @@ private:
                /* Add children */
                shared_ptr<DKDMGroup> g = dynamic_pointer_cast<DKDMGroup> (base);
                if (g) {
-                       BOOST_FOREACH (shared_ptr<DKDMBase> i, g->children()) {
+                       for (auto i: g->children()) {
                                add_dkdm_view (i);
                        }
                }
index fef5dea..d0ee0ca 100644 (file)
@@ -226,7 +226,7 @@ from_film (
 
        try {
                list<KDMWithMetadataPtr> kdms;
-               BOOST_FOREACH (shared_ptr<Screen> 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<dcp::EncryptedKDM>
 sub_find_dkdm (shared_ptr<DKDMGroup> group, string cpl_id)
 {
-       BOOST_FOREACH (shared_ptr<DKDMBase> i, group->children()) {
+       for (auto i: group->children()) {
                shared_ptr<DKDMGroup> g = dynamic_pointer_cast<DKDMGroup>(i);
                if (g) {
                        optional<dcp::EncryptedKDM> 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<KDMWithMetadataPtr> kdms;
-               BOOST_FOREACH (shared_ptr<Screen> i, screens) {
+               for (auto i: screens) {
                        if (!i->recipient) {
                                continue;
                        }
@@ -375,7 +375,7 @@ dump_dkdm_group (shared_ptr<DKDMGroup> group, int indent)
                }
                cout << group->name() << "\n";
        }
-       BOOST_FOREACH (shared_ptr<DKDMBase> i, group->children()) {
+       for (auto i: group->children()) {
                shared_ptr<DKDMGroup> g = dynamic_pointer_cast<DKDMGroup>(i);
                if (g) {
                        dump_dkdm_group (g, indent + 2);
index 5b2c9a5..0586db9 100644 (file)
@@ -278,7 +278,7 @@ public:
                }
 
                bool ok = true;
-               BOOST_FOREACH (shared_ptr<Content> i, _film->content()) {
+               for (auto i: _film->content()) {
                        shared_ptr<DCPContent> d = dynamic_pointer_cast<DCPContent>(i);
                        if (d && !d->kdm_timing_window_valid()) {
                                ok = false;
@@ -303,7 +303,7 @@ public:
                if (dcp) {
                        DCPExaminer ex (dcp, true);
                        shared_ptr<dcp::CPL> playing_cpl;
-                       BOOST_FOREACH (shared_ptr<dcp::CPL> i, ex.cpls()) {
+                       for (auto i: ex.cpls()) {
                                if (!dcp->cpl() || i->id() == *dcp->cpl()) {
                                        playing_cpl = i;
                                }
@@ -415,10 +415,10 @@ public:
                /* Start off as Flat */
                _film->set_container (Ratio::from_id("185"));
 
-               BOOST_FOREACH (shared_ptr<Content> i, _film->content()) {
+               for (auto i: _film->content()) {
                        shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent>(i);
 
-                       BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+                       for (auto j: i->text) {
                                j->set_use (true);
                        }
 
@@ -452,7 +452,7 @@ public:
                        if (first) {
                                DCPExaminer ex (first, true);
                                int id = ID_view_cpl;
-                               BOOST_FOREACH (shared_ptr<dcp::CPL> i, ex.cpls()) {
+                               for (auto i: ex.cpls()) {
                                        wxMenuItem* j = _cpl_menu->AppendRadioItem(
                                                id,
                                                wxString::Format("%s (%s)", std_to_wx(i->annotation_text()).data(), std_to_wx(i->id()).data())
@@ -612,7 +612,7 @@ private:
                        if (!ok || !report_errors_from_last_job(this)) {
                                return;
                        }
-                       BOOST_FOREACH (shared_ptr<TextContent> i, dcp->text) {
+                       for (auto i: dcp->text) {
                                i->set_use (true);
                        }
                        if (dcp->video) {
index 261f089..1dca8c1 100644 (file)
@@ -36,7 +36,6 @@
 #include <wx/imaglist.h>
 #include <wx/spinctrl.h>
 #include <wx/preferences.h>
-#include <boost/foreach.hpp>
 
 using std::exception;
 using std::cout;
@@ -171,7 +170,7 @@ private:
                }
 
                int N = 0;
-               BOOST_FOREACH (shared_ptr<SignalSPL> i, _playlists) {
+               for (auto i: _playlists) {
                        if (i == playlist) {
                                _list->SetItem (N, 0, std_to_wx(i->name()));
                        }
@@ -196,7 +195,7 @@ private:
                        } catch (...) {}
                }
 
-               BOOST_FOREACH (shared_ptr<SignalSPL> i, _playlists) {
+               for (auto i: _playlists) {
                        add_playlist_to_view (i);
                }
        }
@@ -318,7 +317,7 @@ public:
                _playlist = playlist;
                _list->DeleteAllItems ();
                if (_playlist) {
-                       BOOST_FOREACH (SPLEntry i, _playlist->get()) {
+                       for (auto i: _playlist->get()) {
                                add (i);
                        }
                        _name->SetValue (std_to_wx(_playlist->name()));
index c59fefe..4039a07 100644 (file)
@@ -36,7 +36,6 @@ DCPOMATIC_DISABLE_WARNINGS
 #include <wx/icon.h>
 DCPOMATIC_ENABLE_WARNINGS
 #include <boost/thread.hpp>
-#include <boost/foreach.hpp>
 #include <boost/optional.hpp>
 #include <iostream>
 
@@ -72,7 +71,7 @@ public:
 
        string get () const {
                string a;
-               BOOST_FOREACH (string const & i, _log) {
+               for (auto const& i: _log) {
                        a += i + "\n";
                }
                return a;
index 1cb167c..41b2a9d 100644 (file)
@@ -30,7 +30,6 @@
 #include "lib/job_manager.h"
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -204,7 +203,7 @@ AudioDialog::try_to_load_analysis ()
                _plot->set_analysis (shared_ptr<AudioAnalysis> ());
                _analysis.reset ();
 
-               BOOST_FOREACH (shared_ptr<Job> i, JobManager::instance()->get()) {
+               for (auto i: JobManager::instance()->get()) {
                        if (dynamic_pointer_cast<AnalyseAudioJob>(i)) {
                                i->cancel ();
                        }
@@ -256,7 +255,7 @@ AudioDialog::try_to_load_analysis ()
                        mapped = film->mapped_audio_channels ();
                }
 
-               BOOST_FOREACH (int i, mapped) {
+               for (auto i: mapped) {
                        if (_channel_checkbox[i]) {
                                _channel_checkbox[i]->SetValue (true);
                                _plot->set_channel_visible (i, true);
index 04a4684..60606b1 100644 (file)
@@ -36,7 +36,6 @@ DCPOMATIC_DISABLE_WARNINGS
 #include <wx/grid.h>
 #include <wx/graphics.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -191,7 +190,7 @@ AudioMappingView::paint_column_labels (wxDC& dc)
        wxCoord label_width;
        wxCoord label_height;
        int N = 0;
-       BOOST_FOREACH (NamedChannel const& i, _output_channels) {
+       for (auto const& i: _output_channels) {
                dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height);
                dc.DrawText (std_to_wx(i.name), LEFT_WIDTH + GRID_SPACING * N + (GRID_SPACING - label_width) / 2, GRID_SPACING + (GRID_SPACING - label_height) / 2);
                ++N;
@@ -226,7 +225,7 @@ AudioMappingView::paint_row_labels (wxDC& dc)
        /* Row channel labels */
 
        int N = 0;
-       BOOST_FOREACH (NamedChannel const& i, _input_channels) {
+       for (auto const& i: _input_channels) {
                dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height);
                dc.DrawText (std_to_wx(i.name), GRID_SPACING * 2 + (GRID_SPACING - label_width) / 2, TOP_HEIGHT + GRID_SPACING * N + (GRID_SPACING - label_height) / 2);
                ++N;
@@ -244,7 +243,7 @@ AudioMappingView::paint_row_labels (wxDC& dc)
        /* Group labels and lines */
 
        int y = TOP_HEIGHT;
-       BOOST_FOREACH (Group i, _input_groups) {
+       for (auto i: _input_groups) {
                int const height = (i.to - i.from + 1) * GRID_SPACING;
                dc.GetTextExtent (std_to_wx(i.name), &label_width, &label_height);
                if (label_width > height) {
@@ -440,7 +439,7 @@ AudioMappingView::mouse_event_to_input_group_name (wxMouseEvent& ev) const
        }
 
        int y = (ev.GetY() + _vertical_scroll->GetThumbPosition() - (GRID_SPACING * 2)) / GRID_SPACING;
-       BOOST_FOREACH (Group i, _input_groups) {
+       for (auto i: _input_groups) {
                if (i.from <= y && y <= i.to) {
                        return i.name;
                }
@@ -551,7 +550,7 @@ wxString
 AudioMappingView::input_channel_name_with_group (NamedChannel const& n) const
 {
        optional<wxString> group;
-       BOOST_FOREACH (Group i, _input_groups) {
+       for (auto i: _input_groups) {
                if (i.from <= n.index && n.index <= i.to) {
                        group = std_to_wx (i.name);
                }
index bf73798..dc2b91f 100644 (file)
@@ -35,7 +35,6 @@
 #include "lib/dcp_content.h"
 #include "lib/audio_content.h"
 #include <wx/spinctrl.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::vector;
@@ -196,7 +195,7 @@ AudioPanel::film_content_changed (int property)
 
                        vector<AudioMappingView::Group> groups;
                        int c = 0;
-                       BOOST_FOREACH (shared_ptr<const AudioStream> i, ac.front()->audio->streams()) {
+                       for (auto i: ac.front()->audio->streams()) {
                                shared_ptr<const FFmpegAudioStream> f = dynamic_pointer_cast<const FFmpegAudioStream> (i);
                                string name = "";
                                if (f) {
index 682abe4..cb10908 100644 (file)
@@ -310,7 +310,7 @@ AudioPlot::plot_peak (wxGraphicsPath& path, int channel, Metrics const & metrics
        DCPOMATIC_ASSERT (_peak.find(channel) != _peak.end());
 
        path.MoveToPoint (_peak[channel][0].draw);
-       BOOST_FOREACH (Point const & i, _peak[channel]) {
+       for (auto const& i: _peak[channel]) {
                path.AddLineToPoint (i.draw);
        }
 }
@@ -379,7 +379,7 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel, Metrics const & metrics)
        DCPOMATIC_ASSERT (_rms.find(channel) != _rms.end());
 
        path.MoveToPoint (_rms[channel][0].draw);
-       BOOST_FOREACH (Point const & i, _rms[channel]) {
+       for (auto const& i: _rms[channel]) {
                path.AddLineToPoint (i.draw);
        }
 }
@@ -425,7 +425,7 @@ void
 AudioPlot::search (map<int, PointList> const & search, wxMouseEvent const & ev, double& min_dist, Point& min_point) const
 {
        for (map<int, PointList>::const_iterator i = search.begin(); i != search.end(); ++i) {
-               BOOST_FOREACH (Point const & j, i->second) {
+               for (auto const& j: i->second) {
                        double const dist = pow(ev.GetX() - j.draw.x, 2) + pow(ev.GetY() - j.draw.y, 2);
                        if (dist < min_dist) {
                                min_dist = dist;
index ecb7d81..e67fe77 100644 (file)
@@ -22,7 +22,6 @@
 #include "wx_util.h"
 #include "lib/dcpomatic_assert.h"
 #include "lib/util.h"
-#include <boost/foreach.hpp>
 
 using std::string;
 using std::vector;
index 71fc152..4f34f05 100644 (file)
@@ -237,8 +237,8 @@ ClosedCaptionsDialog::update_tracks (shared_ptr<const Film> film)
 {
        _tracks.clear ();
 
-       BOOST_FOREACH (shared_ptr<Content> i, film->content()) {
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+       for (auto i: film->content()) {
+               for (auto j: i->text) {
                        if (j->use() && j->type() == TEXT_CLOSED_CAPTION && j->dcp_track()) {
                                if (find(_tracks.begin(), _tracks.end(), j->dcp_track()) == _tracks.end()) {
                                        _tracks.push_back (*j->dcp_track());
@@ -248,7 +248,7 @@ ClosedCaptionsDialog::update_tracks (shared_ptr<const Film> film)
        }
 
        _track->Clear ();
-       BOOST_FOREACH (DCPTextTrack const & i, _tracks) {
+       for (auto const& i: _tracks) {
                _track->Append (std_to_wx(String::compose("%1 (%2)", i.name, i.language)));
        }
 
index 0d341ba..14abc28 100644 (file)
@@ -488,7 +488,7 @@ CertificateChainEditor::update_certificate_list ()
        _certificates->DeleteAllItems ();
        size_t n = 0;
        dcp::CertificateChain::List certs = _get()->root_to_leaf ();
-       BOOST_FOREACH (dcp::Certificate const & i, certs) {
+       for (auto const& i: certs) {
                wxListItem item;
                item.SetId (n);
                _certificates->InsertItem (item);
index b2ebbe6..818ab4d 100644 (file)
@@ -44,7 +44,6 @@ DCPOMATIC_DISABLE_WARNINGS
 DCPOMATIC_ENABLE_WARNINGS
 #include <RtAudio.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 class AudioMappingView;
index 5b0c151..7709442 100644 (file)
@@ -23,7 +23,6 @@
 #include "static_text.h"
 #include "check_box.h"
 #include "lib/config.h"
-#include <boost/foreach.hpp>
 
 using std::list;
 using std::string;
@@ -35,7 +34,7 @@ ConfirmKDMEmailDialog::ConfirmKDMEmailDialog (wxWindow* parent, list<string> ema
        : QuestionDialog (parent, _("Confirm KDM email"), _("Send emails"), _("Don't send emails"))
 {
        wxString message = _("Are you sure you want to send emails to the following addresses?\n\n");
-       BOOST_FOREACH (string i, emails) {
+       for (auto i: emails) {
                message += "\t" + std_to_wx (i) + "\n";
        }
 
index 351d5aa..da9e1a4 100644 (file)
@@ -26,7 +26,6 @@
 #include "lib/config.h"
 #include "lib/util.h"
 #include <wx/statline.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::string;
@@ -65,7 +64,7 @@ ContentColourConversionDialog::ContentColourConversionDialog (wxWindow* parent,
 
        _editor_connection = _editor->Changed.connect (boost::bind (&ContentColourConversionDialog::check_for_preset, this));
 
-       BOOST_FOREACH (PresetColourConversion const &i, PresetColourConversion::all ()) {
+       for (auto const& i: PresetColourConversion::all ()) {
                _preset_choice->Append (std_to_wx (i.name));
        }
 }
index 57c6afe..d93fd31 100644 (file)
@@ -43,7 +43,6 @@
 #include <dcp/decrypted_kdm.h>
 #include <wx/wx.h>
 #include <wx/dirdlg.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -122,7 +121,7 @@ ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
        _repeat->Enable (!_content.empty ());
 
        int n = 0;
-       BOOST_FOREACH (shared_ptr<Content> i, _content) {
+       for (auto i: _content) {
                if (dynamic_pointer_cast<FFmpegContent> (i)) {
                        ++n;
                }
@@ -147,7 +146,7 @@ ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
                                _choose_cpl->Enable (cpls.size() > 1);
                                /* We can't have 0 as a menu item ID on OS X */
                                int id = 1;
-                               BOOST_FOREACH (shared_ptr<dcp::CPL> i, cpls) {
+                               for (auto i: cpls) {
                                        wxMenuItem* item = _cpl_menu->AppendRadioItem (
                                                id++,
                                                wxString::Format (
@@ -228,7 +227,7 @@ void
 ContentMenu::join ()
 {
        vector<shared_ptr<Content> > fc;
-       BOOST_FOREACH (shared_ptr<Content> i, _content) {
+       for (auto i: _content) {
                shared_ptr<FFmpegContent> f = dynamic_pointer_cast<FFmpegContent> (i);
                if (f) {
                        fc.push_back (f);
@@ -269,7 +268,7 @@ ContentMenu::remove ()
                /* Special case: we only remove FFmpegContent if its video view is selected;
                   if not, and its audio view is selected, we unmap the audio.
                */
-               BOOST_FOREACH (shared_ptr<Content> i, _content) {
+               for (auto i: _content) {
                        shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (i);
                        if (!fc) {
                                continue;
@@ -278,7 +277,7 @@ ContentMenu::remove ()
                        shared_ptr<TimelineVideoContentView> video;
                        shared_ptr<TimelineAudioContentView> audio;
 
-                       BOOST_FOREACH (shared_ptr<TimelineContentView> j, _views) {
+                       for (auto j: _views) {
                                shared_ptr<TimelineVideoContentView> v = dynamic_pointer_cast<TimelineVideoContentView> (j);
                                shared_ptr<TimelineAudioContentView> a = dynamic_pointer_cast<TimelineAudioContentView> (j);
                                if (v && v->content() == fc) {
@@ -350,7 +349,7 @@ ContentMenu::find_missing ()
                return;
        }
 
-       BOOST_FOREACH (shared_ptr<Content> i, content) {
+       for (auto i: content) {
                shared_ptr<Job> j (new ExamineContentJob (film, i));
 
                j->Finished.connect (
@@ -375,7 +374,7 @@ ContentMenu::re_examine ()
                return;
        }
 
-       BOOST_FOREACH (shared_ptr<Content> i, _content) {
+       for (auto i: _content) {
                JobManager::instance()->add (shared_ptr<Job> (new ExamineContentJob (film, i)));
        }
 }
@@ -434,7 +433,7 @@ ContentMenu::kdm ()
                DCPExaminer ex (dcp, true);
 
                bool kdm_matches_any_cpl = false;
-               BOOST_FOREACH (shared_ptr<dcp::CPL> i, ex.cpls()) {
+               for (auto i: ex.cpls()) {
                        if (i->id() == kdm->cpl_id()) {
                                kdm_matches_any_cpl = true;
                        }
index 7114e83..8353940 100644 (file)
@@ -48,7 +48,6 @@
 #include <wx/listctrl.h>
 #include <wx/display.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::list;
@@ -183,7 +182,7 @@ ContentPanel::selected_video ()
 {
        ContentList vc;
 
-       BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
+       for (auto i: selected()) {
                if (i->video) {
                        vc.push_back (i);
                }
@@ -197,7 +196,7 @@ ContentPanel::selected_audio ()
 {
        ContentList ac;
 
-       BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
+       for (auto i: selected()) {
                if (i->audio) {
                        ac.push_back (i);
                }
@@ -211,7 +210,7 @@ ContentPanel::selected_text ()
 {
        ContentList sc;
 
-       BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
+       for (auto i: selected()) {
                if (!i->text.empty()) {
                        sc.push_back (i);
                }
@@ -225,7 +224,7 @@ ContentPanel::selected_ffmpeg ()
 {
        FFmpegContentList sc;
 
-       BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
+       for (auto i: selected()) {
                shared_ptr<FFmpegContent> t = dynamic_pointer_cast<FFmpegContent> (i);
                if (t) {
                        sc.push_back (t);
@@ -247,7 +246,7 @@ ContentPanel::film_changed (Film::Property p)
                break;
        }
 
-       BOOST_FOREACH (ContentSubPanel* i, panels()) {
+       for (auto i: panels()) {
                i->film_changed (p);
        }
 }
@@ -286,12 +285,12 @@ ContentPanel::check_selection ()
 
        setup_sensitivity ();
 
-       BOOST_FOREACH (ContentSubPanel* i, panels()) {
+       for (auto i: panels()) {
                i->content_selection_changed ();
        }
 
        optional<DCPTime> go_to;
-       BOOST_FOREACH (shared_ptr<Content> i, selected()) {
+       for (auto i: selected()) {
                DCPTime p;
                p = i->position();
                if (dynamic_pointer_cast<StringTextFileContent>(i) && i->paths_valid()) {
@@ -333,14 +332,14 @@ ContentPanel::check_selection ()
        bool have_video = false;
        bool have_audio = false;
        bool have_text[TEXT_COUNT] = { false, false };
-       BOOST_FOREACH (shared_ptr<Content> i, selected()) {
+       for (auto i: selected()) {
                if (i->video) {
                        have_video = true;
                }
                if (i->audio) {
                        have_audio = true;
                }
-               BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+               for (auto j: i->text) {
                        have_text[j->original_type()] = true;
                }
        }
@@ -468,7 +467,7 @@ ContentPanel::add_folder_clicked ()
                return;
        }
 
-       BOOST_FOREACH (shared_ptr<Content> i, content) {
+       for (auto i: content) {
                shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
                if (ic) {
                        ImageSequenceDialog* e = new ImageSequenceDialog (_splitter);
@@ -517,7 +516,7 @@ ContentPanel::remove_clicked (bool hotkey)
                return true;
        }
 
-       BOOST_FOREACH (shared_ptr<Content> i, selected ()) {
+       for (auto i: selected ()) {
                _film->remove_content (i);
        }
 
@@ -669,7 +668,7 @@ ContentPanel::film_content_changed (int property)
                setup ();
        }
 
-       BOOST_FOREACH (ContentSubPanel* i, panels()) {
+       for (auto i: panels()) {
                i->film_content_changed (property);
        }
 }
@@ -697,7 +696,7 @@ ContentPanel::setup ()
 
        _content->DeleteAllItems ();
 
-       BOOST_FOREACH (shared_ptr<Content> i, content) {
+       for (auto i: content) {
                int const t = _content->GetItemCount ();
                bool const valid = i->paths_valid ();
 
@@ -771,8 +770,8 @@ ContentPanel::add_files (list<boost::filesystem::path> paths)
        /* XXX: check for lots of files here and do something */
 
        try {
-               BOOST_FOREACH (boost::filesystem::path i, paths) {
-                       BOOST_FOREACH (shared_ptr<Content> j, content_factory(i)) {
+               for (auto i: paths) {
+                       for (auto j: content_factory(i)) {
                                _film->examine_and_add_content (j);
                        }
                }
index bf1f67a..2e0e360 100644 (file)
@@ -25,7 +25,6 @@
 #include "lib/video_content.h"
 #include "lib/audio_content.h"
 #include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
 
 using std::string;
 using std::list;
@@ -38,7 +37,7 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<c
        : TableDialog (parent, _("Content Properties"), 2, 1, false)
 {
        map<UserProperty::Category, list<UserProperty> > grouped;
-       BOOST_FOREACH (UserProperty i, content->user_properties(film)) {
+       for (auto i: content->user_properties(film)) {
                if (grouped.find(i.category) == grouped.end()) {
                        grouped[i.category] = list<UserProperty> ();
                }
@@ -91,7 +90,7 @@ ContentPropertiesDialog::maybe_add_group (map<UserProperty::Category, list<UserP
        add (m, false);
        add_spacer ();
 
-       BOOST_FOREACH (UserProperty j, i->second) {
+       for (auto j: i->second) {
                add (std_to_wx (j.key), true);
                add (new StaticText (this, std_to_wx (j.value + " " + j.unit)));
        }
index b4ba551..e0a1a52 100644 (file)
@@ -25,7 +25,6 @@
 #include "lib/compose.hpp"
 #include "lib/log.h"
 #include <wx/notebook.h>
-#include <boost/foreach.hpp>
 
 using std::list;
 using std::string;
index 67a9a3f..44e575d 100644 (file)
@@ -106,7 +106,7 @@ ContentView::update ()
        while (jm->work_to_do()) {
                if (!progress.Pulse()) {
                        /* user pressed cancel */
-                       BOOST_FOREACH (shared_ptr<Job> i, jm->get()) {
+                       for (auto i: jm->get()) {
                                i->cancel();
                        }
                        return;
@@ -115,7 +115,7 @@ ContentView::update ()
        }
 
        /* Add content from successful jobs and report errors */
-       BOOST_FOREACH (shared_ptr<ExamineContentJob> i, jobs) {
+       for (auto i: jobs) {
                if (i->finished_in_error()) {
                        error_dialog(this, std_to_wx(i->error_summary()) + ".\n", std_to_wx(i->error_details()));
                } else {
@@ -156,7 +156,7 @@ ContentView::add (shared_ptr<Content> content)
 shared_ptr<Content>
 ContentView::get (string digest) const
 {
-       BOOST_FOREACH (shared_ptr<Content> i, _content) {
+       for (auto i: _content) {
                if (i->digest() == digest) {
                        return i;
                }
index 972b30b..5d94130 100644 (file)
@@ -47,7 +47,6 @@
 #include <wx/gbsizer.h>
 #include <wx/spinctrl.h>
 #include <boost/lexical_cast.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
@@ -137,7 +136,7 @@ DCPPanel::DCPPanel (wxNotebook* n, shared_ptr<Film> film, weak_ptr<FilmViewer> v
        _markers->Bind               (wxEVT_BUTTON,   boost::bind (&DCPPanel::markers_clicked, this));
        _metadata->Bind              (wxEVT_BUTTON,   boost::bind (&DCPPanel::metadata_clicked, this));
 
-       BOOST_FOREACH (DCPContentType const * i, DCPContentType::all()) {
+       for (auto i: DCPContentType::all()) {
                _dcp_content_type->Append (std_to_wx (i->pretty_name ()));
        }
 
@@ -746,11 +745,11 @@ DCPPanel::make_video_panel ()
        _three_d->Bind           (wxEVT_CHECKBOX, boost::bind(&DCPPanel::three_d_changed, this));
        _reencode_j2k->Bind      (wxEVT_CHECKBOX, boost::bind(&DCPPanel::reencode_j2k_changed, this));
 
-       BOOST_FOREACH (Ratio const * i, Ratio::containers()) {
+       for (auto i: Ratio::containers()) {
                _container->Append (std_to_wx(i->container_nickname()));
        }
 
-       BOOST_FOREACH (int i, Config::instance()->allowed_dcp_frame_rates()) {
+       for (auto i: Config::instance()->allowed_dcp_frame_rates()) {
                _frame_rate_choice->Append (std_to_wx (boost::lexical_cast<string> (i)));
        }
 
@@ -923,7 +922,7 @@ void
 DCPPanel::add_audio_processors ()
 {
        _audio_processor->Append (_("None"), new wxStringClientData (N_("none")));
-       BOOST_FOREACH (AudioProcessor const * ap, AudioProcessor::visible()) {
+       for (auto ap: AudioProcessor::visible()) {
                _audio_processor->Append (std_to_wx(ap->name()), new wxStringClientData(std_to_wx(ap->id())));
        }
        _audio_panel_sizer->Layout();
index fe97cf6..c46fed7 100644 (file)
@@ -91,7 +91,7 @@ DKDMDialog::DKDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        right->Add (h);
 
        vector<CPLSummary> cpls;
-       BOOST_FOREACH (CPLSummary const & i, film->cpls()) {
+       for (auto const& i: film->cpls()) {
                if (i.encrypted) {
                        cpls.push_back (i);
                }
@@ -153,7 +153,7 @@ DKDMDialog::make_clicked ()
 
        list<KDMWithMetadataPtr> kdms;
        try {
-               BOOST_FOREACH (shared_ptr<DKDMRecipient> i, _recipients->recipients()) {
+               for (auto i: _recipients->recipients()) {
                        KDMWithMetadataPtr p = kdm_for_dkdm_recipient (film, _cpl->cpl(), i, _timing->from(), _timing->until());
                        if (p) {
                                kdms.push_back (p);
index 762ed7b..964662f 100644 (file)
@@ -119,7 +119,7 @@ DKDMOutputPanel::make (
                }
 
                bool kdms_with_no_email = false;
-               BOOST_FOREACH (KDMWithMetadataPtr i, kdms) {
+               for (auto i: kdms) {
                        if (i->emails().empty()) {
                                kdms_with_no_email = true;
                        }
@@ -134,8 +134,8 @@ DKDMOutputPanel::make (
 
                if (proceed && Config::instance()->confirm_kdm_email()) {
                        list<string> emails;
-                       BOOST_FOREACH (KDMWithMetadataPtr const& i, kdms) {
-                               BOOST_FOREACH (string j, i->emails()) {
+                       for (auto const& i: kdms) {
+                               for (auto j: i->emails()) {
                                        emails.push_back (j);
                                }
                        }
index e30ef30..6eaa1d3 100644 (file)
@@ -28,7 +28,6 @@
 #include <dcp/raw_convert.h>
 #include <curl/curl.h>
 #include <zip.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::string;
@@ -195,7 +194,7 @@ DolbyDoremiCertificatePanel::do_download ()
                _dialog->message()->SetLabel (wxT (""));
 
                string s;
-               BOOST_FOREACH (string e, errors) {
+               for (auto e: errors) {
                        s += e + "\n";
                }
 
index ec9f6da..627223c 100644 (file)
@@ -55,7 +55,7 @@ DownloadCertificateDialog::DownloadCertificateDialog (wxWindow* parent)
        _pages.push_back (new QubeCertificatePanel (this, N_("QXI")));
        _pages.push_back (new QubeCertificatePanel (this, N_("QXPD")));
 
-       BOOST_FOREACH (DownloadCertificatePanel* i, _pages) {
+       for (auto i: _pages) {
                _notebook->AddPage (i, i->name(), true);
        }
 
index 7902d0b..f90d219 100644 (file)
@@ -83,7 +83,7 @@ public:
                }
 
                int total_width = 0;
-               BOOST_FOREACH (EditableListColumn i, _columns) {
+               for (auto i: _columns) {
                        total_width += i.width.get_value_or (_default_width);
                }
 
@@ -101,7 +101,7 @@ public:
 #endif
 
                int j = 0;
-               BOOST_FOREACH (EditableListColumn i, _columns) {
+               for (auto i: _columns) {
                        wxListItem ip;
                        ip.SetId (j);
                        ip.SetText (i.name);
@@ -268,7 +268,7 @@ private:
                int fixed_width = 0;
                int growable = 0;
                int j = 0;
-               BOOST_FOREACH (EditableListColumn i, _columns) {
+               for (auto i: _columns) {
                        fixed_width += i.width.get_value_or (_default_width);
                        if (!i.growable) {
                                _list->SetColumnWidth (j, i.width.get_value_or(_default_width));
@@ -279,7 +279,7 @@ private:
                }
 
                j = 0;
-               BOOST_FOREACH (EditableListColumn i, _columns) {
+               for (auto i: _columns) {
                        if (i.growable) {
                                _list->SetColumnWidth (j, i.width.get_value_or(_default_width) + (w - fixed_width) / growable);
                        }
index ce91c3c..bb40dad 100644 (file)
@@ -32,7 +32,6 @@
 #include "lib/dcp_content.h"
 #include <wx/wx.h>
 #include <wx/notebook.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::cout;
index 2c9b165..2ef6c99 100644 (file)
@@ -28,7 +28,6 @@
 #include "lib/compose.hpp"
 #include <wx/stdpaths.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 
 using namespace std;
 using namespace boost;
@@ -68,7 +67,7 @@ FilmNameLocationDialog::FilmNameLocationDialog (wxWindow* parent, wxString title
        if (offer_templates) {
                _template_name->Enable (false);
 
-               BOOST_FOREACH (string i, Config::instance()->templates ()) {
+               for (auto i: Config::instance()->templates ()) {
                        _template_name->Append (std_to_wx (i));
                }
 
index cc25ccd..6e5b486 100644 (file)
@@ -463,7 +463,7 @@ FilmViewer::set_coalesce_player_changes (bool c)
        _coalesce_player_changes = c;
 
        if (!c) {
-               BOOST_FOREACH (int i, _pending_player_changes) {
+               for (auto i: _pending_player_changes) {
                        player_change (CHANGE_TYPE_DONE, i, false);
                }
                _pending_player_changes.clear ();
@@ -622,7 +622,7 @@ FilmViewer::average_latency () const
         }
 
         Frame total = 0;
-        BOOST_FOREACH (Frame i, _latency_history) {
+        for (auto i: _latency_history) {
                 total += i;
         }
 
index 6f479e5..a65f515 100644 (file)
@@ -28,7 +28,6 @@
 #include "wx_util.h"
 #include "lib/film.h"
 #include "lib/filter.h"
-#include <boost/foreach.hpp>
 
 
 using namespace std;
@@ -46,7 +45,7 @@ FilterDialog::FilterDialog (wxWindow* parent, vector<Filter const *> const & act
        typedef map<string, list<Filter const *> > CategoryMap;
        CategoryMap categories;
 
-       BOOST_FOREACH (Filter const* i, filters) {
+       for (auto i: filters) {
                CategoryMap::iterator j = categories.find (i->category());
                if (j == categories.end ()) {
                        list<Filter const *> c;
@@ -65,7 +64,7 @@ FilterDialog::FilterDialog (wxWindow* parent, vector<Filter const *> const & act
                c->SetFont(font);
                sizer->Add (c, 1, wxTOP | wxBOTTOM, DCPOMATIC_SIZER_GAP);
 
-               BOOST_FOREACH (Filter const* j, i->second) {
+               for (auto j: i->second) {
                        wxCheckBox* b = new CheckBox(panel, std_to_wx(j->name()));
                        bool const a = find (active.begin(), active.end(), j) != active.end();
                        b->SetValue (a);
index 8ff6cf1..29af6a7 100644 (file)
@@ -26,7 +26,6 @@
 #include "lib/content.h"
 #include "lib/text_content.h"
 #include <wx/wx.h>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::list;
@@ -92,7 +91,7 @@ FontsDialog::setup ()
 
        _fonts->DeleteAllItems ();
        size_t n = 0;
-       BOOST_FOREACH (shared_ptr<Font> i, caption->fonts ()) {
+       for (auto i: caption->fonts ()) {
                wxListItem item;
                item.SetId (n);
                _fonts->InsertItem (item);
@@ -131,7 +130,7 @@ FontsDialog::edit_clicked ()
        int const item = _fonts->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        string const id = wx_to_std (_fonts->GetItemText (item, 0));
        shared_ptr<Font> font;
-       BOOST_FOREACH (shared_ptr<Font> i, caption->fonts()) {
+       for (auto i: caption->fonts()) {
                if (i->id() == id) {
                        font = i;
                }
index f376d96..ea84136 100644 (file)
@@ -57,7 +57,6 @@
 #include <wx/filepicker.h>
 #include <RtAudio.h>
 #include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::vector;
@@ -331,13 +330,13 @@ private:
 
                _isdcf_metadata_button->Bind (wxEVT_BUTTON, boost::bind (&DefaultsPage::edit_isdcf_metadata_clicked, this));
 
-               BOOST_FOREACH (Ratio const * i, Ratio::containers()) {
+               for (auto i: Ratio::containers()) {
                        _container->Append (std_to_wx(i->container_nickname()));
                }
 
                _container->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::container_changed, this));
 
-               BOOST_FOREACH (DCPContentType const * i, DCPContentType::all()) {
+               for (auto i: DCPContentType::all()) {
                        _dcp_content_type->Append (std_to_wx (i->pretty_name ()));
                }
 
index 7018566..9c8b87d 100644 (file)
@@ -37,7 +37,7 @@ GainCalculatorDialog::GainCalculatorDialog (wxWindow* parent)
        add (_("But I have to use fader"), true);
        _actual = add (new wxTextCtrl (this, wxID_ANY, wxT (""), wxDefaultPosition, wxDefaultSize, 0, wxTextValidator (wxFILTER_NUMERIC)));
 
-       BOOST_FOREACH (CinemaSoundProcessor const * i, CinemaSoundProcessor::all()) {
+       for (auto i: CinemaSoundProcessor::all()) {
                _processor->Append (std_to_wx(i->name()));
        }
 
index 78aa237..2c6bac1 100644 (file)
@@ -29,7 +29,6 @@
 DCPOMATIC_DISABLE_WARNINGS
 #include <wx/richtext/richtextctrl.h>
 DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
 
 using std::max;
 using std::vector;
@@ -139,7 +138,7 @@ HintsDialog::update ()
                }
        } else {
                _text->BeginStandardBullet (N_("standard/circle"), 1, 50);
-               BOOST_FOREACH (string i, _current) {
+               for (auto i: _current) {
                        _text->WriteText (std_to_wx (i));
                        _text->Newline ();
                }
index 3c0f446..6b34130 100644 (file)
@@ -31,7 +31,6 @@
 #include "lib/util.h"
 #include "lib/exceptions.h"
 #include "lib/compose.hpp"
-#include <boost/foreach.hpp>
 #include <iostream>
 
 using std::string;
@@ -109,9 +108,9 @@ JobManagerView::replace ()
 
        list<shared_ptr<JobView> > new_job_records;
 
-       BOOST_FOREACH (shared_ptr<Job> i, JobManager::instance()->get()) {
+       for (auto i: JobManager::instance()->get()) {
                /* Find this job's JobView */
-               BOOST_FOREACH (shared_ptr<JobView> j, _job_records) {
+               for (auto j: _job_records) {
                        if (j->job() == i) {
                                new_job_records.push_back (j);
                                break;
@@ -119,13 +118,13 @@ JobManagerView::replace ()
                }
        }
 
-       BOOST_FOREACH (shared_ptr<JobView> i, _job_records) {
+       for (auto i: _job_records) {
                i->detach ();
        }
 
        _job_records = new_job_records;
 
-       BOOST_FOREACH (shared_ptr<JobView> i, _job_records) {
+       for (auto i: _job_records) {
                i->insert (i->insert_position ());
        }
 
@@ -135,7 +134,7 @@ JobManagerView::replace ()
 void
 JobManagerView::job_list_changed ()
 {
-       BOOST_FOREACH (shared_ptr<JobView> i, _job_records) {
+       for (auto i: _job_records) {
                i->job_list_changed ();
        }
 }
index 88c73ed..be5e42d 100644 (file)
@@ -27,7 +27,6 @@ DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
 DCPOMATIC_ENABLE_WARNINGS
 #include <libcxml/cxml.h>
-#include <boost/foreach.hpp>
 
 using std::vector;
 
@@ -72,7 +71,7 @@ KDMCPLPanel::update_cpl_choice ()
 {
        _cpl->Clear ();
 
-       BOOST_FOREACH (CPLSummary const & i, _cpls) {
+       for (auto const& i: _cpls) {
                _cpl->Append (std_to_wx(i.cpl_id));
 
                if (_cpls.size() > 0) {
@@ -116,10 +115,10 @@ KDMCPLPanel::cpl_browse_clicked ()
                cpl_document.read_file (cpl_file);
 
                bool encrypted = false;
-               BOOST_FOREACH (cxml::ConstNodePtr i, cpl_document.node_children("ReelList")) {
-                       BOOST_FOREACH (cxml::ConstNodePtr j, i->node_children("Reel")) {
-                               BOOST_FOREACH (cxml::ConstNodePtr k, j->node_children("AssetList")) {
-                                       BOOST_FOREACH (cxml::ConstNodePtr l, k->node_children()) {
+               for (auto i: cpl_document.node_children("ReelList")) {
+                       for (auto j: i->node_children("Reel")) {
+                               for (auto k: j->node_children("AssetList")) {
+                                       for (auto l: k->node_children()) {
                                                if (!l->node_children("KeyId").empty()) {
                                                        encrypted = true;
                                                }
index 6667011..601562b 100644 (file)
@@ -92,7 +92,7 @@ KDMDialog::KDMDialog (wxWindow* parent, shared_ptr<const Film> film)
        right->Add (h);
 
        vector<CPLSummary> cpls;
-       BOOST_FOREACH (CPLSummary const & i, film->cpls()) {
+       for (auto const& i: film->cpls()) {
                if (i.encrypted) {
                        cpls.push_back (i);
                }
@@ -164,7 +164,7 @@ KDMDialog::make_clicked ()
                        for_audio = _output->forensic_mark_audio_up_to();
                }
 
-               BOOST_FOREACH (shared_ptr<dcpomatic::Screen> i, _screens->screens()) {
+               for (auto i: _screens->screens()) {
                        KDMWithMetadataPtr p = kdm_for_screen (film, _cpl->cpl(), i, _timing->from(), _timing->until(), _output->formulation(), !_output->forensic_mark_video(), for_audio);
                        if (p) {
                                kdms.push_back (p);
index c08a767..b002a76 100644 (file)
@@ -209,7 +209,7 @@ KDMOutputPanel::make (
                }
 
                bool cinemas_with_no_email = false;
-               BOOST_FOREACH (list<KDMWithMetadataPtr> i, cinema_kdms) {
+               for (auto i: cinema_kdms) {
                        if (i.front()->emails().empty()) {
                                cinemas_with_no_email = true;
                        }
@@ -224,8 +224,8 @@ KDMOutputPanel::make (
 
                if (proceed && Config::instance()->confirm_kdm_email ()) {
                        list<string> emails;
-                       BOOST_FOREACH (list<KDMWithMetadataPtr> const& i, cinema_kdms) {
-                               BOOST_FOREACH (string j, i.front()->emails()) {
+                       for (auto const& i: cinema_kdms) {
+                               for (auto j: i.front()->emails()) {
                                        emails.push_back (j);
                                }
                        }
index 2d2fc81..d9add6d 100644 (file)
@@ -27,7 +27,6 @@
 #include <wx/wx.h>
 #include <boost/algorithm/string.hpp>
 #include <boost/bind/bind.hpp>
-#include <boost/foreach.hpp>
 #include <boost/optional.hpp>
 #include <boost/signals2.hpp>
 #include <iostream>
@@ -85,7 +84,7 @@ public:
                        _matching_subtags.clear ();
 
                        boost::algorithm::to_lower(search);
-                       BOOST_FOREACH (dcp::LanguageTag::SubtagData const& i, _all_subtags) {
+                       for (auto const& i: _all_subtags) {
                                if (
                                        (boost::algorithm::to_lower_copy(i.subtag).find(search) != string::npos) ||
                                        (boost::algorithm::to_lower_copy(i.description).find(search) != string::npos)) {
@@ -262,7 +261,7 @@ dcp::LanguageTag LanguageTagDialog::get () const
        vector<dcp::LanguageTag::VariantSubtag> variants;
        vector<dcp::LanguageTag::ExtlangSubtag> extlangs;
 
-       BOOST_FOREACH (Subtag i, _current_tag_subtags) {
+       for (auto i: _current_tag_subtags) {
                if (!i.subtag) {
                        continue;
                }
@@ -401,7 +400,7 @@ LanguageTagDialog::setup_sensitivity ()
        _add_region->Enable ();
        _add_variant->Enable ();
        _add_external->Enable ();
-       BOOST_FOREACH (Subtag const& i, _current_tag_subtags) {
+       for (auto const& i: _current_tag_subtags) {
                switch (i.type) {
                        case dcp::LanguageTag::SCRIPT:
                                _add_script->Enable (false);