summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/audio_dialog.cc5
-rw-r--r--src/wx/audio_mapping_view.cc11
-rw-r--r--src/wx/audio_panel.cc3
-rw-r--r--src/wx/audio_plot.cc6
-rw-r--r--src/wx/cinema_dialog.cc1
-rw-r--r--src/wx/closed_captions_dialog.cc6
-rw-r--r--src/wx/config_dialog.cc2
-rw-r--r--src/wx/config_dialog.h1
-rw-r--r--src/wx/confirm_kdm_email_dialog.cc3
-rw-r--r--src/wx/content_colour_conversion_dialog.cc3
-rw-r--r--src/wx/content_menu.cc17
-rw-r--r--src/wx/content_panel.cc31
-rw-r--r--src/wx/content_properties_dialog.cc5
-rw-r--r--src/wx/content_sub_panel.cc1
-rw-r--r--src/wx/content_view.cc6
-rw-r--r--src/wx/dcp_panel.cc9
-rw-r--r--src/wx/dkdm_dialog.cc4
-rw-r--r--src/wx/dkdm_output_panel.cc6
-rw-r--r--src/wx/dolby_doremi_certificate_panel.cc3
-rw-r--r--src/wx/download_certificate_dialog.cc2
-rw-r--r--src/wx/editable_list.h8
-rw-r--r--src/wx/film_editor.cc1
-rw-r--r--src/wx/film_name_location_dialog.cc3
-rw-r--r--src/wx/film_viewer.cc4
-rw-r--r--src/wx/filter_dialog.cc5
-rw-r--r--src/wx/fonts_dialog.cc5
-rw-r--r--src/wx/full_config_dialog.cc5
-rw-r--r--src/wx/gain_calculator_dialog.cc2
-rw-r--r--src/wx/hints_dialog.cc3
-rw-r--r--src/wx/job_manager_view.cc11
-rw-r--r--src/wx/kdm_cpl_panel.cc11
-rw-r--r--src/wx/kdm_dialog.cc4
-rw-r--r--src/wx/kdm_output_panel.cc6
-rw-r--r--src/wx/language_tag_dialog.cc7
-rw-r--r--src/wx/move_to_dialog.cc3
-rw-r--r--src/wx/nag_dialog.cc1
-rw-r--r--src/wx/name_format_editor.h1
-rw-r--r--src/wx/player_config_dialog.cc1
-rw-r--r--src/wx/player_stress_tester.cc3
-rw-r--r--src/wx/playlist_controls.cc6
-rw-r--r--src/wx/qube_certificate_panel.cc2
-rw-r--r--src/wx/recipients_panel.cc3
-rw-r--r--src/wx/recreate_chain_dialog.cc1
-rw-r--r--src/wx/save_template_dialog.cc1
-rw-r--r--src/wx/screens_panel.cc9
-rw-r--r--src/wx/servers_list_dialog.cc3
-rw-r--r--src/wx/suspender.cc3
-rw-r--r--src/wx/system_font_dialog.cc3
-rw-r--r--src/wx/templates_dialog.cc3
-rw-r--r--src/wx/text_panel.cc29
-rw-r--r--src/wx/text_view.cc4
-rw-r--r--src/wx/timeline.cc21
-rw-r--r--src/wx/timeline_audio_content_view.cc2
-rw-r--r--src/wx/timeline_content_view.cc3
-rw-r--r--src/wx/timeline_reels_view.cc3
-rw-r--r--src/wx/timing_panel.cc35
-rw-r--r--src/wx/verify_dcp_dialog.cc3
-rw-r--r--src/wx/video_panel.cc33
-rw-r--r--src/wx/wx_util.cc2
59 files changed, 168 insertions, 210 deletions
diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc
index 1cb167c95..41b2a9d39 100644
--- a/src/wx/audio_dialog.cc
+++ b/src/wx/audio_dialog.cc
@@ -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);
diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc
index 04a468416..60606b166 100644
--- a/src/wx/audio_mapping_view.cc
+++ b/src/wx/audio_mapping_view.cc
@@ -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);
}
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc
index bf73798da..dc2b91f47 100644
--- a/src/wx/audio_panel.cc
+++ b/src/wx/audio_panel.cc
@@ -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) {
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc
index 682abe432..cb10908df 100644
--- a/src/wx/audio_plot.cc
+++ b/src/wx/audio_plot.cc
@@ -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;
diff --git a/src/wx/cinema_dialog.cc b/src/wx/cinema_dialog.cc
index ecb7d8107..e67fe77ed 100644
--- a/src/wx/cinema_dialog.cc
+++ b/src/wx/cinema_dialog.cc
@@ -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;
diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc
index 71fc15272..4f34f0531 100644
--- a/src/wx/closed_captions_dialog.cc
+++ b/src/wx/closed_captions_dialog.cc
@@ -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)));
}
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 0d341ba73..14abc286b 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -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);
diff --git a/src/wx/config_dialog.h b/src/wx/config_dialog.h
index b2ebbe605..818ab4def 100644
--- a/src/wx/config_dialog.h
+++ b/src/wx/config_dialog.h
@@ -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;
diff --git a/src/wx/confirm_kdm_email_dialog.cc b/src/wx/confirm_kdm_email_dialog.cc
index 5b0c1510f..7709442c9 100644
--- a/src/wx/confirm_kdm_email_dialog.cc
+++ b/src/wx/confirm_kdm_email_dialog.cc
@@ -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";
}
diff --git a/src/wx/content_colour_conversion_dialog.cc b/src/wx/content_colour_conversion_dialog.cc
index 351d5aa65..da9e1a41b 100644
--- a/src/wx/content_colour_conversion_dialog.cc
+++ b/src/wx/content_colour_conversion_dialog.cc
@@ -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));
}
}
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc
index 57c6afeb3..d93fd31b2 100644
--- a/src/wx/content_menu.cc
+++ b/src/wx/content_menu.cc
@@ -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;
}
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index 7114e8337..83539403d 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -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);
}
}
diff --git a/src/wx/content_properties_dialog.cc b/src/wx/content_properties_dialog.cc
index bf1f67ace..2e0e360d9 100644
--- a/src/wx/content_properties_dialog.cc
+++ b/src/wx/content_properties_dialog.cc
@@ -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)));
}
diff --git a/src/wx/content_sub_panel.cc b/src/wx/content_sub_panel.cc
index b4ba55175..e0a1a52bd 100644
--- a/src/wx/content_sub_panel.cc
+++ b/src/wx/content_sub_panel.cc
@@ -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;
diff --git a/src/wx/content_view.cc b/src/wx/content_view.cc
index 67a9a3fa5..44e575d93 100644
--- a/src/wx/content_view.cc
+++ b/src/wx/content_view.cc
@@ -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;
}
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc
index 972b30bac..5d941301b 100644
--- a/src/wx/dcp_panel.cc
+++ b/src/wx/dcp_panel.cc
@@ -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();
diff --git a/src/wx/dkdm_dialog.cc b/src/wx/dkdm_dialog.cc
index fe97cf642..c46fed760 100644
--- a/src/wx/dkdm_dialog.cc
+++ b/src/wx/dkdm_dialog.cc
@@ -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);
diff --git a/src/wx/dkdm_output_panel.cc b/src/wx/dkdm_output_panel.cc
index 762ed7b7e..964662f0e 100644
--- a/src/wx/dkdm_output_panel.cc
+++ b/src/wx/dkdm_output_panel.cc
@@ -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);
}
}
diff --git a/src/wx/dolby_doremi_certificate_panel.cc b/src/wx/dolby_doremi_certificate_panel.cc
index e30ef30a4..6eaa1d3ae 100644
--- a/src/wx/dolby_doremi_certificate_panel.cc
+++ b/src/wx/dolby_doremi_certificate_panel.cc
@@ -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";
}
diff --git a/src/wx/download_certificate_dialog.cc b/src/wx/download_certificate_dialog.cc
index ec9f6dade..627223c46 100644
--- a/src/wx/download_certificate_dialog.cc
+++ b/src/wx/download_certificate_dialog.cc
@@ -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);
}
diff --git a/src/wx/editable_list.h b/src/wx/editable_list.h
index 7902d0b79..f90d219f8 100644
--- a/src/wx/editable_list.h
+++ b/src/wx/editable_list.h
@@ -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);
}
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc
index ce91c3cc4..bb40dad9f 100644
--- a/src/wx/film_editor.cc
+++ b/src/wx/film_editor.cc
@@ -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;
diff --git a/src/wx/film_name_location_dialog.cc b/src/wx/film_name_location_dialog.cc
index 2c9b165d0..2ef6c9955 100644
--- a/src/wx/film_name_location_dialog.cc
+++ b/src/wx/film_name_location_dialog.cc
@@ -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));
}
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index cc25ccdd5..6e5b486d5 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -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;
}
diff --git a/src/wx/filter_dialog.cc b/src/wx/filter_dialog.cc
index 6f479e546..a65f5153a 100644
--- a/src/wx/filter_dialog.cc
+++ b/src/wx/filter_dialog.cc
@@ -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);
diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc
index 8ff6cf13e..29af6a739 100644
--- a/src/wx/fonts_dialog.cc
+++ b/src/wx/fonts_dialog.cc
@@ -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;
}
diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc
index f376d9682..ea84136e1 100644
--- a/src/wx/full_config_dialog.cc
+++ b/src/wx/full_config_dialog.cc
@@ -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 ()));
}
diff --git a/src/wx/gain_calculator_dialog.cc b/src/wx/gain_calculator_dialog.cc
index 701856610..9c8b87dac 100644
--- a/src/wx/gain_calculator_dialog.cc
+++ b/src/wx/gain_calculator_dialog.cc
@@ -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()));
}
diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc
index 78aa237e1..2c6bac14a 100644
--- a/src/wx/hints_dialog.cc
+++ b/src/wx/hints_dialog.cc
@@ -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 ();
}
diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc
index 3c0f44675..6b341307d 100644
--- a/src/wx/job_manager_view.cc
+++ b/src/wx/job_manager_view.cc
@@ -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 ();
}
}
diff --git a/src/wx/kdm_cpl_panel.cc b/src/wx/kdm_cpl_panel.cc
index 88c73ed11..be5e42dd8 100644
--- a/src/wx/kdm_cpl_panel.cc
+++ b/src/wx/kdm_cpl_panel.cc
@@ -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;
}
diff --git a/src/wx/kdm_dialog.cc b/src/wx/kdm_dialog.cc
index 666701168..601562b27 100644
--- a/src/wx/kdm_dialog.cc
+++ b/src/wx/kdm_dialog.cc
@@ -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);
diff --git a/src/wx/kdm_output_panel.cc b/src/wx/kdm_output_panel.cc
index c08a76732..b002a765c 100644
--- a/src/wx/kdm_output_panel.cc
+++ b/src/wx/kdm_output_panel.cc
@@ -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);
}
}
diff --git a/src/wx/language_tag_dialog.cc b/src/wx/language_tag_dialog.cc
index 2d2fc81f6..d9add6dca 100644
--- a/src/wx/language_tag_dialog.cc
+++ b/src/wx/language_tag_dialog.cc
@@ -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);
diff --git a/src/wx/move_to_dialog.cc b/src/wx/move_to_dialog.cc
index b4b6e3ae3..542655477 100644
--- a/src/wx/move_to_dialog.cc
+++ b/src/wx/move_to_dialog.cc
@@ -21,7 +21,6 @@
#include "move_to_dialog.h"
#include "lib/film.h"
#include <wx/spinctrl.h>
-#include <boost/foreach.hpp>
using std::list;
using std::shared_ptr;
@@ -41,7 +40,7 @@ MoveToDialog::MoveToDialog (wxWindow* parent, optional<DCPTime> position, shared
if (position) {
int j = 0;
- BOOST_FOREACH (DCPTimePeriod i, film->reels()) {
+ for (auto i: film->reels()) {
if (i.from == position.get()) {
_reel->SetValue (j + 1);
}
diff --git a/src/wx/nag_dialog.cc b/src/wx/nag_dialog.cc
index 5b989bdb5..466b80b6b 100644
--- a/src/wx/nag_dialog.cc
+++ b/src/wx/nag_dialog.cc
@@ -22,7 +22,6 @@
#include "wx_util.h"
#include "static_text.h"
#include "check_box.h"
-#include <boost/foreach.hpp>
using std::shared_ptr;
#if BOOST_VERSION >= 106100
diff --git a/src/wx/name_format_editor.h b/src/wx/name_format_editor.h
index 32c78ea25..e3728615f 100644
--- a/src/wx/name_format_editor.h
+++ b/src/wx/name_format_editor.h
@@ -27,7 +27,6 @@
DCPOMATIC_DISABLE_WARNINGS
#include <wx/wx.h>
DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
#include <boost/signals2.hpp>
class NameFormatEditor
diff --git a/src/wx/player_config_dialog.cc b/src/wx/player_config_dialog.cc
index 3158b279c..06a1ef56b 100644
--- a/src/wx/player_config_dialog.cc
+++ b/src/wx/player_config_dialog.cc
@@ -54,7 +54,6 @@
#include <wx/filepicker.h>
#include <RtAudio.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <iostream>
using std::vector;
diff --git a/src/wx/player_stress_tester.cc b/src/wx/player_stress_tester.cc
index dfe2d181e..6dd2dd674 100644
--- a/src/wx/player_stress_tester.cc
+++ b/src/wx/player_stress_tester.cc
@@ -24,7 +24,6 @@
#include <dcp/util.h>
#include <wx/wx.h>
#include <boost/algorithm/string.hpp>
-#include <boost/foreach.hpp>
#include <boost/bind/bind.hpp>
#include <string>
#include <vector>
@@ -99,7 +98,7 @@ PlayerStressTester::load_script (boost::filesystem::path file)
vector<string> lines;
string const script = dcp::file_to_string(file);
boost::split (lines, script, boost::is_any_of("\n"));
- BOOST_FOREACH (string i, lines) {
+ for (auto i: lines) {
_commands.push_back (Command(i));
}
_current_command = _commands.begin();
diff --git a/src/wx/playlist_controls.cc b/src/wx/playlist_controls.cc
index 56ff5f40d..d65cb0fcc 100644
--- a/src/wx/playlist_controls.cc
+++ b/src/wx/playlist_controls.cc
@@ -288,7 +288,7 @@ PlaylistControls::update_playlist_directory ()
}
sort (_playlists.begin(), _playlists.end(), SPLComparator());
- BOOST_FOREACH (SPL i, _playlists) {
+ for (auto i: _playlists) {
add_playlist_to_list (i);
}
@@ -349,7 +349,7 @@ PlaylistControls::select_playlist (int selected, int position)
wxProgressDialog dialog (_("DCP-o-matic"), "Loading playlist and KDMs");
- BOOST_FOREACH (SPLEntry const & i, _playlists[selected].get()) {
+ for (auto const& i: _playlists[selected].get()) {
dialog.Pulse ();
shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (i.content);
if (dcp && dcp->needs_kdm()) {
@@ -375,7 +375,7 @@ PlaylistControls::select_playlist (int selected, int position)
_current_spl_view->DeleteAllItems ();
int N = 0;
- BOOST_FOREACH (SPLEntry i, _playlists[selected].get()) {
+ for (auto i: _playlists[selected].get()) {
wxListItem it;
it.SetId (N);
it.SetColumn (0);
diff --git a/src/wx/qube_certificate_panel.cc b/src/wx/qube_certificate_panel.cc
index 70fe0ae47..c67cc46f2 100644
--- a/src/wx/qube_certificate_panel.cc
+++ b/src/wx/qube_certificate_panel.cc
@@ -53,7 +53,7 @@ QubeCertificatePanel::do_download ()
string const serial = wx_to_std(_serial->GetValue());
optional<string> name;
- BOOST_FOREACH (string i, files) {
+ for (auto i: files) {
if (boost::algorithm::starts_with(i, String::compose("%1-%2-", _type, serial))) {
name = i;
break;
diff --git a/src/wx/recipients_panel.cc b/src/wx/recipients_panel.cc
index 086eac3e4..e59293fe7 100644
--- a/src/wx/recipients_panel.cc
+++ b/src/wx/recipients_panel.cc
@@ -23,7 +23,6 @@
#include "recipient_dialog.h"
#include "dcpomatic_button.h"
#include "lib/config.h"
-#include <boost/foreach.hpp>
#include <list>
#include <iostream>
@@ -225,7 +224,7 @@ RecipientsPanel::add_recipients ()
{
_root = _targets->AddRoot ("Foo");
- BOOST_FOREACH (shared_ptr<DKDMRecipient> i, Config::instance()->dkdm_recipients()) {
+ for (auto i: Config::instance()->dkdm_recipients()) {
add_recipient (i);
}
}
diff --git a/src/wx/recreate_chain_dialog.cc b/src/wx/recreate_chain_dialog.cc
index 322d5964c..92e71af34 100644
--- a/src/wx/recreate_chain_dialog.cc
+++ b/src/wx/recreate_chain_dialog.cc
@@ -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;
diff --git a/src/wx/save_template_dialog.cc b/src/wx/save_template_dialog.cc
index d1f60b8d1..6a6644efe 100644
--- a/src/wx/save_template_dialog.cc
+++ b/src/wx/save_template_dialog.cc
@@ -21,7 +21,6 @@
#include "save_template_dialog.h"
#include "wx_util.h"
#include "lib/config.h"
-#include <boost/foreach.hpp>
using std::string;
#if BOOST_VERSION >= 106100
diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc
index ee88d0178..02b51f860 100644
--- a/src/wx/screens_panel.cc
+++ b/src/wx/screens_panel.cc
@@ -26,7 +26,6 @@
#include "lib/config.h"
#include "lib/cinema.h"
#include "lib/screen.h"
-#include <boost/foreach.hpp>
using std::list;
using std::pair;
@@ -134,7 +133,7 @@ ScreensPanel::add_cinema (shared_ptr<Cinema> c)
_cinemas[id] = c;
- BOOST_FOREACH (shared_ptr<Screen> i, c->screens()) {
+ for (auto i: c->screens()) {
add_screen (c, i);
}
@@ -239,7 +238,7 @@ ScreensPanel::add_screen_clicked ()
return;
}
- BOOST_FOREACH (shared_ptr<Screen> i, c->screens ()) {
+ for (auto i: c->screens ()) {
if (i->name == d->name()) {
error_dialog (
GetParent(),
@@ -280,7 +279,7 @@ ScreensPanel::edit_screen_clicked ()
}
shared_ptr<Cinema> c = s.second->cinema;
- BOOST_FOREACH (shared_ptr<Screen> i, c->screens ()) {
+ for (auto i: c->screens ()) {
if (i != s.second && i->name == d->name()) {
error_dialog (
GetParent(),
@@ -399,7 +398,7 @@ ScreensPanel::add_cinemas ()
{
_root = _targets->AddRoot ("Foo");
- BOOST_FOREACH (shared_ptr<Cinema> i, Config::instance()->cinemas ()) {
+ for (auto i: Config::instance()->cinemas()) {
add_cinema (i);
}
}
diff --git a/src/wx/servers_list_dialog.cc b/src/wx/servers_list_dialog.cc
index 37a143384..d904a2ef0 100644
--- a/src/wx/servers_list_dialog.cc
+++ b/src/wx/servers_list_dialog.cc
@@ -23,7 +23,6 @@
#include "lib/encode_server_finder.h"
#include "lib/encode_server_description.h"
#include <boost/lexical_cast.hpp>
-#include <boost/foreach.hpp>
using std::list;
using std::string;
@@ -77,7 +76,7 @@ ServersListDialog::servers_list_changed ()
int n = 0;
- BOOST_FOREACH (EncodeServerDescription i, EncodeServerFinder::instance()->servers()) {
+ for (auto i: EncodeServerFinder::instance()->servers()) {
wxListItem list_item;
list_item.SetId (n);
_list->InsertItem (list_item);
diff --git a/src/wx/suspender.cc b/src/wx/suspender.cc
index 9b1b64c85..6cd78326a 100644
--- a/src/wx/suspender.cc
+++ b/src/wx/suspender.cc
@@ -19,7 +19,6 @@
*/
#include "suspender.h"
-#include <boost/foreach.hpp>
Suspender::Suspender(boost::function<void (int)> handler)
: _handler (handler)
@@ -56,7 +55,7 @@ Suspender::decrement ()
{
--_count;
if (_count == 0) {
- BOOST_FOREACH (int i, _pending) {
+ for (auto i: _pending) {
_handler (i);
}
_pending.clear ();
diff --git a/src/wx/system_font_dialog.cc b/src/wx/system_font_dialog.cc
index 167f7f75d..6a98ecec6 100644
--- a/src/wx/system_font_dialog.cc
+++ b/src/wx/system_font_dialog.cc
@@ -22,7 +22,6 @@
#include "wx_util.h"
#include <wx/listctrl.h>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <iostream>
using std::cout;
@@ -62,7 +61,7 @@ SystemFontDialog::SystemFontDialog (wxWindow* parent)
sizer->Add (_list, 0, wxALL, DCPOMATIC_SIZER_X_GAP);
int n = 0;
- BOOST_FOREACH (boost::filesystem::path i, _fonts) {
+ for (auto i: _fonts) {
_list->InsertItem (n++, std_to_wx (i.leaf().stem().string ()));
}
diff --git a/src/wx/templates_dialog.cc b/src/wx/templates_dialog.cc
index 53eb2e422..e8f9b8a2b 100644
--- a/src/wx/templates_dialog.cc
+++ b/src/wx/templates_dialog.cc
@@ -24,7 +24,6 @@
#include "dcpomatic_button.h"
#include "lib/config.h"
#include <wx/wx.h>
-#include <boost/foreach.hpp>
using std::string;
using boost::bind;
@@ -82,7 +81,7 @@ TemplatesDialog::refresh ()
{
_list->DeleteAllItems ();
- BOOST_FOREACH (string i, Config::instance()->templates()) {
+ for (auto i: Config::instance()->templates()) {
wxListItem list_item;
int const n = _list->GetItemCount ();
list_item.SetId (n);
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc
index 5b54fa35b..521e55fc5 100644
--- a/src/wx/text_panel.cc
+++ b/src/wx/text_panel.cc
@@ -43,7 +43,6 @@
#include "lib/analyse_subtitles_job.h"
#include "lib/subtitle_analysis.h"
#include <wx/spinctrl.h>
-#include <boost/foreach.hpp>
using std::vector;
using std::string;
@@ -279,7 +278,7 @@ TextPanel::update_dcp_track_selection ()
optional<DCPTextTrack> selected;
bool many = false;
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
+ for (auto i: _parent->selected_text()) {
shared_ptr<TextContent> t = i->text_of_original_type(_original_type);
if (t) {
optional<DCPTextTrack> dt = t->dcp_track();
@@ -292,7 +291,7 @@ TextPanel::update_dcp_track_selection ()
}
int n = 0;
- BOOST_FOREACH (DCPTextTrack i, _parent->film()->closed_caption_tracks()) {
+ for (auto i: _parent->film()->closed_caption_tracks()) {
if (!many && selected && *selected == i) {
_dcp_track->SetSelection (n);
}
@@ -310,7 +309,7 @@ TextPanel::update_dcp_tracks ()
DCPOMATIC_ASSERT (_dcp_track);
_dcp_track->Clear ();
- BOOST_FOREACH (DCPTextTrack i, _parent->film()->closed_caption_tracks()) {
+ for (auto i: _parent->film()->closed_caption_tracks()) {
/* XXX: don't display the "magic" track which has empty name and language;
this is a nasty hack (see also Film::closed_caption_tracks)
*/
@@ -339,7 +338,7 @@ TextPanel::dcp_track_changed ()
d->Destroy ();
} else {
/* Find the DCPTextTrack that was selected */
- BOOST_FOREACH (DCPTextTrack i, _parent->film()->closed_caption_tracks()) {
+ for (auto i: _parent->film()->closed_caption_tracks()) {
if (i.summary() == wx_to_std(_dcp_track->GetStringSelection())) {
track = i;
}
@@ -347,7 +346,7 @@ TextPanel::dcp_track_changed ()
}
if (track) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
+ for (auto i: _parent->selected_text()) {
shared_ptr<TextContent> t = i->text_of_original_type(_original_type);
if (t && t->type() == TEXT_CLOSED_CAPTION) {
t->set_dcp_track(*track);
@@ -464,7 +463,7 @@ TextPanel::film_content_changed (int property)
void
TextPanel::use_toggled ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
+ for (auto i: _parent->selected_text()) {
i->text_of_original_type(_original_type)->set_use (_use->GetValue());
}
}
@@ -486,7 +485,7 @@ TextPanel::current_type () const
void
TextPanel::type_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text()) {
+ for (auto i: _parent->selected_text()) {
i->text_of_original_type(_original_type)->set_type (current_type ());
}
@@ -496,7 +495,7 @@ TextPanel::type_changed ()
void
TextPanel::burn_toggled ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ for (auto i: _parent->selected_text ()) {
i->text_of_original_type(_original_type)->set_burn (_burn->GetValue());
}
}
@@ -510,7 +509,7 @@ TextPanel::setup_sensitivity ()
/* DCP subs can't have their line spacing changed */
int dcp_subs = 0;
ContentList sel = _parent->selected_text ();
- BOOST_FOREACH (shared_ptr<Content> i, sel) {
+ for (auto i: sel) {
/* These are the content types that could include subtitles */
shared_ptr<const FFmpegContent> fc = std::dynamic_pointer_cast<const FFmpegContent> (i);
shared_ptr<const StringTextFileContent> sc = std::dynamic_pointer_cast<const StringTextFileContent> (i);
@@ -616,7 +615,7 @@ TextPanel::stream_changed ()
void
TextPanel::x_offset_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ for (auto i: _parent->selected_text ()) {
i->text_of_original_type(_original_type)->set_x_offset (_x_offset->GetValue() / 100.0);
}
}
@@ -624,7 +623,7 @@ TextPanel::x_offset_changed ()
void
TextPanel::y_offset_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ for (auto i: _parent->selected_text ()) {
i->text_of_original_type(_original_type)->set_y_offset (_y_offset->GetValue() / 100.0);
}
}
@@ -641,7 +640,7 @@ TextPanel::x_scale_changed ()
void
TextPanel::y_scale_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ for (auto i: _parent->selected_text ()) {
i->text_of_original_type(_original_type)->set_y_scale (_y_scale->GetValue() / 100.0);
}
}
@@ -649,7 +648,7 @@ TextPanel::y_scale_changed ()
void
TextPanel::line_spacing_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_text ()) {
+ for (auto i: _parent->selected_text ()) {
i->text_of_original_type(_original_type)->set_line_spacing (_line_spacing->GetValue() / 100.0);
}
}
@@ -770,7 +769,7 @@ TextPanel::try_to_load_analysis ()
boost::filesystem::path const path = _parent->film()->subtitle_analysis_path(content);
if (!boost::filesystem::exists(path)) {
- BOOST_FOREACH (shared_ptr<Job> i, JobManager::instance()->get()) {
+ for (auto i: JobManager::instance()->get()) {
if (dynamic_pointer_cast<AnalyseSubtitlesJob>(i)) {
i->cancel ();
}
diff --git a/src/wx/text_view.cc b/src/wx/text_view.cc
index b4b2baae2..3b674b5c1 100644
--- a/src/wx/text_view.cc
+++ b/src/wx/text_view.cc
@@ -94,7 +94,7 @@ TextView::TextView (
_frc = film->active_frame_rate_change (content->position());
/* Find the decoder that is being used for our TextContent and attach to it */
- BOOST_FOREACH (shared_ptr<TextDecoder> i, decoder->text) {
+ for (auto i: decoder->text) {
if (i->content() == text) {
i->PlainStart.connect (bind (&TextView::data_start, this, _1));
i->Stop.connect (bind (&TextView::data_stop, this, _1));
@@ -107,7 +107,7 @@ TextView::TextView (
void
TextView::data_start (ContentStringText cts)
{
- BOOST_FOREACH (dcp::SubtitleString const & i, cts.subs) {
+ for (auto const& i: cts.subs) {
wxListItem list_item;
list_item.SetId (_subs);
_list->InsertItem (list_item);
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 054eac734..e5182a0a4 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -39,7 +39,6 @@
#include "lib/video_content.h"
#include "lib/atmos_mxf_content.h"
#include <wx/graphics.h>
-#include <boost/foreach.hpp>
#include <list>
#include <iterator>
#include <iostream>
@@ -174,13 +173,13 @@ Timeline::paint_main ()
gc->SetAntialiasMode (wxANTIALIAS_DEFAULT);
- BOOST_FOREACH (shared_ptr<TimelineView> i, _views) {
+ for (auto i: _views) {
shared_ptr<TimelineContentView> ic = dynamic_pointer_cast<TimelineContentView> (i);
/* Find areas of overlap with other content views, so that we can plot them */
list<dcpomatic::Rect<int> > overlaps;
- BOOST_FOREACH (shared_ptr<TimelineView> j, _views) {
+ for (auto j: _views) {
shared_ptr<TimelineContentView> jc = dynamic_pointer_cast<TimelineContentView> (j);
/* No overlap with non-content views, views no different tracks, audio views or non-active views */
if (!ic || !jc || i == j || ic->track() != jc->track() || ic->track().get_value_or(2) >= 2 || !ic->active() || !jc->active()) {
@@ -251,7 +250,7 @@ Timeline::recreate_views ()
_views.push_back (_time_axis_view);
_views.push_back (_reels_view);
- BOOST_FOREACH (shared_ptr<Content> i, film->content ()) {
+ for (auto i: film->content ()) {
if (i->video) {
_views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, i)));
}
@@ -260,7 +259,7 @@ Timeline::recreate_views ()
_views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i)));
}
- BOOST_FOREACH (shared_ptr<TextContent> j, i->text) {
+ for (auto j: i->text) {
_views.push_back (shared_ptr<TimelineView> (new TimelineTextContentView (*this, i, j)));
}
@@ -299,7 +298,7 @@ place (shared_ptr<const Film> film, TimelineViewList& views, int& tracks)
{
int const base = tracks;
- BOOST_FOREACH (shared_ptr<TimelineView> i, views) {
+ for (auto i: views) {
if (!dynamic_pointer_cast<T>(i)) {
continue;
}
@@ -396,7 +395,7 @@ Timeline::assign_tracks ()
/* Video */
bool have_3d = false;
- BOOST_FOREACH (shared_ptr<TimelineView> i, _views) {
+ for (auto i: _views) {
shared_ptr<TimelineVideoContentView> cv = dynamic_pointer_cast<TimelineVideoContentView> (i);
if (!cv) {
continue;
@@ -421,7 +420,7 @@ Timeline::assign_tracks ()
/* Atmos */
bool have_atmos = false;
- BOOST_FOREACH (shared_ptr<TimelineView> i, _views) {
+ for (auto i: _views) {
shared_ptr<TimelineAtmosContentView> cv = dynamic_pointer_cast<TimelineAtmosContentView>(i);
if (cv) {
cv->set_track (_tracks);
@@ -559,7 +558,7 @@ Timeline::left_down_select (wxMouseEvent& ev)
_start_snaps.push_back (cv->content()->end(film));
_end_snaps.push_back (cv->content()->end(film));
- BOOST_FOREACH (DCPTime i, cv->content()->reel_split_points(film)) {
+ for (auto i: cv->content()->reel_split_points(film)) {
_start_snaps.push_back (i);
}
}
@@ -776,11 +775,11 @@ Timeline::set_position_from_event (wxMouseEvent& ev, bool force_emit)
/* Find the nearest snap point */
- BOOST_FOREACH (DCPTime i, _start_snaps) {
+ for (auto i: _start_snaps) {
maybe_snap (i, new_position, nearest_distance);
}
- BOOST_FOREACH (DCPTime i, _end_snaps) {
+ for (auto i: _end_snaps) {
maybe_snap (i, new_end, nearest_distance);
}
diff --git a/src/wx/timeline_audio_content_view.cc b/src/wx/timeline_audio_content_view.cc
index d26c40252..03481343c 100644
--- a/src/wx/timeline_audio_content_view.cc
+++ b/src/wx/timeline_audio_content_view.cc
@@ -71,7 +71,7 @@ TimelineAudioContentView::label () const
list<int> mapped = ac->mapping().mapped_output_channels();
if (!mapped.empty ()) {
s += " → ";
- BOOST_FOREACH (int i, mapped) {
+ for (auto i: mapped) {
s += std_to_wx(short_audio_channel_name(i)) + ", ";
}
s = s.Left(s.Length() - 2);
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc
index 2f2b7e3ed..8258a81f9 100644
--- a/src/wx/timeline_content_view.cc
+++ b/src/wx/timeline_content_view.cc
@@ -23,7 +23,6 @@
#include "wx_util.h"
#include "lib/content.h"
#include <wx/graphics.h>
-#include <boost/foreach.hpp>
using std::list;
using std::shared_ptr;
@@ -131,7 +130,7 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>
/* Reel split points */
gc->SetPen (*wxThePenList->FindOrCreatePen (foreground_colour(), 1, wxPENSTYLE_DOT));
- BOOST_FOREACH (DCPTime i, cont->reel_split_points(film)) {
+ for (auto i: cont->reel_split_points(film)) {
path = gc->CreatePath ();
path.MoveToPoint (time_x (i), y_pos (_track.get()) + 4);
path.AddLineToPoint (time_x (i), y_pos (_track.get() + 1) - 4);
diff --git a/src/wx/timeline_reels_view.cc b/src/wx/timeline_reels_view.cc
index fa89c60a7..962451ac3 100644
--- a/src/wx/timeline_reels_view.cc
+++ b/src/wx/timeline_reels_view.cc
@@ -22,7 +22,6 @@
#include "timeline.h"
#include <wx/wx.h>
#include <wx/graphics.h>
-#include <boost/foreach.hpp>
using std::min;
using std::list;
@@ -67,7 +66,7 @@ TimelineReelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >)
gc->SetFont (gc->CreateFont (*wxNORMAL_FONT, wxColour (0, 0, 255)));
int reel = 1;
- BOOST_FOREACH (DCPTimePeriod i, _timeline.film()->reels()) {
+ for (auto i: _timeline.film()->reels()) {
int const size = min (8.0, i.duration().seconds() * pps / 2);
wxGraphicsPath path = gc->CreatePath ();
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index 82aaadedd..ecf55640d 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -43,7 +43,6 @@ DCPOMATIC_DISABLE_WARNINGS
#include <gtk/gtk.h>
DCPOMATIC_ENABLE_WARNINGS
#endif
-#include <boost/foreach.hpp>
#include <set>
#include <iostream>
@@ -179,7 +178,7 @@ void
TimingPanel::update_full_length ()
{
set<DCPTime> check;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
check.insert (i->full_length(_parent->film()));
}
@@ -194,7 +193,7 @@ void
TimingPanel::update_play_length ()
{
set<DCPTime> check;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
check.insert (i->length_after_trim(_parent->film()));
}
@@ -221,7 +220,7 @@ TimingPanel::film_content_changed (int property)
if (property == ContentProperty::POSITION) {
set<DCPTime> check;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
check.insert (i->position ());
}
@@ -242,7 +241,7 @@ TimingPanel::film_content_changed (int property)
} else if (property == ContentProperty::TRIM_START) {
set<ContentTime> check;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
check.insert (i->trim_start ());
}
@@ -255,7 +254,7 @@ TimingPanel::film_content_changed (int property)
} else if (property == ContentProperty::TRIM_END) {
set<ContentTime> check;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
check.insert (i->trim_end ());
}
@@ -282,7 +281,7 @@ TimingPanel::film_content_changed (int property)
shared_ptr<const Content> content;
int count_ac = 0;
int count_sc = 0;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
if (i->video && i->video_frame_rate()) {
check_vc.insert (i->video_frame_rate().get());
content = i;
@@ -300,7 +299,7 @@ TimingPanel::film_content_changed (int property)
}
bool have_still = false;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
shared_ptr<const ImageContent> ic = dynamic_pointer_cast<const ImageContent> (i);
if (ic && ic->still ()) {
have_still = true;
@@ -316,7 +315,7 @@ void
TimingPanel::position_changed ()
{
DCPTime const pos = _position->get (_parent->film()->video_frame_rate ());
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
i->set_position (_parent->film(), pos);
}
}
@@ -326,7 +325,7 @@ TimingPanel::full_length_changed ()
{
int const vfr = _parent->film()->video_frame_rate ();
Frame const len = _full_length->get (vfr).frames_round (vfr);
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
if (ic && ic->still ()) {
ic->video->set_length (len);
@@ -351,7 +350,7 @@ TimingPanel::trim_start_changed ()
optional<DCPTime> ref_ph;
Suspender::Block bl = _film_content_changed_suspender.block ();
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
if (i->position() <= ph && ph < i->end(_parent->film())) {
/* The playhead is in i. Use it as a reference to work out
where to put the playhead post-trim; we're trying to keep the playhead
@@ -384,7 +383,7 @@ TimingPanel::trim_end_changed ()
fv->set_coalesce_player_changes (true);
Suspender::Block bl = _film_content_changed_suspender.block ();
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
ContentTime const trim = _trim_end->get (i->video_frame_rate().get_value_or(_parent->film()->video_frame_rate()));
i->set_trim_end (trim);
}
@@ -402,7 +401,7 @@ TimingPanel::play_length_changed ()
{
DCPTime const play_length = _play_length->get (_parent->film()->video_frame_rate());
Suspender::Block bl = _film_content_changed_suspender.block ();
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
FrameRateChange const frc = _parent->film()->active_frame_rate_change (i->position ());
i->set_trim_end (
ContentTime (max(DCPTime(), i->full_length(_parent->film()) - play_length), frc) - i->trim_start()
@@ -446,7 +445,7 @@ TimingPanel::trim_start_to_playhead_clicked ()
fv->set_coalesce_player_changes (true);
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
if (i->position() < ph && ph < i->end(film)) {
FrameRateChange const frc = film->active_frame_rate_change (i->position());
i->set_trim_start (i->trim_start() + ContentTime (ph - i->position(), frc));
@@ -471,7 +470,7 @@ TimingPanel::trim_end_to_playhead_clicked ()
shared_ptr<const Film> film = _parent->film ();
DCPTime const ph = fv->position().floor (film->video_frame_rate ());
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
if (i->position() < ph && ph < i->end(film)) {
FrameRateChange const frc = film->active_frame_rate_change (i->position ());
i->set_trim_end (ContentTime(i->position() + i->full_length(film) - ph, frc) - i->trim_start());
@@ -495,7 +494,7 @@ TimingPanel::setup_sensitivity ()
DCPOMATIC_ASSERT (fv);
DCPTime const ph = fv->position ();
bool any_over_ph = false;
- BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
if (i->position() <= ph && ph < i->end(_parent->film())) {
any_over_ph = true;
}
@@ -511,7 +510,7 @@ TimingPanel::move_to_start_of_reel_clicked ()
/* Find common position of all selected content, if it exists */
optional<DCPTime> position;
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected ()) {
+ for (auto i: _parent->selected()) {
if (!position) {
position = i->position();
} else {
@@ -525,7 +524,7 @@ TimingPanel::move_to_start_of_reel_clicked ()
MoveToDialog* d = new MoveToDialog (this, position, _parent->film());
if (d->ShowModal() == wxID_OK) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected()) {
+ for (auto i: _parent->selected()) {
i->set_position (_parent->film(), d->position());
}
}
diff --git a/src/wx/verify_dcp_dialog.cc b/src/wx/verify_dcp_dialog.cc
index bf78113d9..55360dc39 100644
--- a/src/wx/verify_dcp_dialog.cc
+++ b/src/wx/verify_dcp_dialog.cc
@@ -26,7 +26,6 @@
DCPOMATIC_DISABLE_WARNINGS
#include <wx/richtext/richtextctrl.h>
DCPOMATIC_ENABLE_WARNINGS
-#include <boost/foreach.hpp>
using std::list;
using std::shared_ptr;
@@ -63,7 +62,7 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
_text->Newline();
}
- BOOST_FOREACH (dcp::VerificationNote i, job->notes()) {
+ for (auto i: job->notes()) {
switch (i.type()) {
case dcp::VerificationNote::VERIFY_WARNING:
_text->BeginStandardBullet (N_("standard/diamond"), 1, 50);
diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc
index 5fcd527b8..81f78b9c0 100644
--- a/src/wx/video_panel.cc
+++ b/src/wx/video_panel.cc
@@ -39,7 +39,6 @@
#include "lib/video_content.h"
#include <wx/spinctrl.h>
#include <wx/tglbtn.h>
-#include <boost/foreach.hpp>
#include <boost/unordered_set.hpp>
#include <boost/functional/hash.hpp>
#include <set>
@@ -171,7 +170,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
_colour_conversion_label = create_label (this, _("Colour conversion"), true);
_colour_conversion = new wxChoice (this, wxID_ANY, wxDefaultPosition, size);
_colour_conversion->Append (_("None"));
- BOOST_FOREACH (PresetColourConversion const & i, PresetColourConversion::all()) {
+ for (auto const& i: PresetColourConversion::all()) {
_colour_conversion->Append (std_to_wx (i.name));
}
@@ -371,7 +370,7 @@ VideoPanel::film_content_changed (int property)
setup_description ();
} else if (property == VideoContentProperty::COLOUR_CONVERSION) {
boost::unordered_set<optional<ColourConversion> > check;
- BOOST_FOREACH (shared_ptr<const Content> i, vc) {
+ for (auto i: vc) {
check.insert (i->video->colour_conversion());
}
@@ -408,7 +407,7 @@ VideoPanel::film_content_changed (int property)
setup_sensitivity ();
} else if (property == VideoContentProperty::FADE_IN) {
set<Frame> check;
- BOOST_FOREACH (shared_ptr<const Content> i, vc) {
+ for (auto i: vc) {
check.insert (i->video->fade_in ());
}
@@ -422,7 +421,7 @@ VideoPanel::film_content_changed (int property)
}
} else if (property == VideoContentProperty::FADE_OUT) {
set<Frame> check;
- BOOST_FOREACH (shared_ptr<const Content> i, vc) {
+ for (auto i: vc) {
check.insert (i->video->fade_out ());
}
@@ -453,7 +452,7 @@ VideoPanel::film_content_changed (int property)
setup_sensitivity ();
} else if (property == VideoContentProperty::CUSTOM_RATIO || property == VideoContentProperty::CUSTOM_SIZE) {
set<Frame> check;
- BOOST_FOREACH (shared_ptr<const Content> i, vc) {
+ for (auto i: vc) {
check.insert (i->video->custom_ratio() || i->video->custom_size());
}
@@ -503,7 +502,7 @@ VideoPanel::colour_conversion_changed ()
if (s == int(all.size() + 1)) {
edit_colour_conversion_clicked ();
} else {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
if (s == 0) {
i->video->unset_colour_conversion ();
} else if (s != int(all.size() + 2)) {
@@ -521,7 +520,7 @@ VideoPanel::edit_colour_conversion_clicked ()
ContentColourConversionDialog* d = new ContentColourConversionDialog (this, vc.front()->video->yuv ());
d->set (vc.front()->video->colour_conversion().get_value_or (PresetColourConversion::all().front().conversion));
if (d->ShowModal() == wxID_OK) {
- BOOST_FOREACH (shared_ptr<Content> i, vc) {
+ for (auto i: vc) {
i->video->set_colour_conversion (d->get ());
}
} else {
@@ -578,7 +577,7 @@ VideoPanel::setup_sensitivity ()
setup_refer_button (_reference, _reference_note, dcp, can_reference, cannot);
bool any_use = false;
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
if (i->video && i->video->use()) {
any_use = true;
}
@@ -636,7 +635,7 @@ VideoPanel::setup_sensitivity ()
void
VideoPanel::fade_in_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video ()) {
+ for (auto i: _parent->selected_video ()) {
double const vfr = i->active_video_frame_rate (_parent->film());
i->video->set_fade_in (_fade_in->get(vfr).frames_round(vfr));
}
@@ -645,7 +644,7 @@ VideoPanel::fade_in_changed ()
void
VideoPanel::fade_out_changed ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video ()) {
+ for (auto i: _parent->selected_video ()) {
double const vfr = i->active_video_frame_rate (_parent->film());
i->video->set_fade_out (_fade_out->get(vfr).frames_round(vfr));
}
@@ -672,7 +671,7 @@ VideoPanel::reference_clicked ()
void
VideoPanel::scale_fit_clicked ()
{
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
i->video->set_custom_ratio (optional<float>());
}
}
@@ -694,7 +693,7 @@ VideoPanel::scale_custom_edit_clicked ()
CustomScaleDialog* d = new CustomScaleDialog (this, vc->size(), _parent->film()->frame_size(), vc->custom_ratio(), vc->custom_size());
int const r = d->ShowModal ();
if (r == wxID_OK) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
i->video->set_custom_ratio (d->custom_ratio());
i->video->set_custom_size (d->custom_size());
}
@@ -722,7 +721,7 @@ void
VideoPanel::left_crop_changed ()
{
if (_left_right_link->GetValue()) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
i->video->set_right_crop (i->video->left_crop());
}
}
@@ -733,7 +732,7 @@ void
VideoPanel::right_crop_changed ()
{
if (_left_right_link->GetValue()) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
i->video->set_left_crop (i->video->right_crop());
}
}
@@ -744,7 +743,7 @@ void
VideoPanel::top_crop_changed ()
{
if (_top_bottom_link->GetValue()) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
i->video->set_bottom_crop (i->video->top_crop());
}
}
@@ -755,7 +754,7 @@ void
VideoPanel::bottom_crop_changed ()
{
if (_top_bottom_link->GetValue()) {
- BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_video()) {
+ for (auto i: _parent->selected_video()) {
i->video->set_top_crop (i->video->bottom_crop());
}
}
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 5d02d27bf..3386b2700 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -522,7 +522,7 @@ display_progress (wxString title, wxString task)
dcpomatic_sleep_seconds (1);
if (!progress.Pulse()) {
/* user pressed cancel */
- BOOST_FOREACH (shared_ptr<Job> i, jm->get()) {
+ for (auto i: jm->get()) {
i->cancel();
}
ok = false;