X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Ftimeline.cc;h=e5182a0a4018139076f4e01b3e3e6fcea5209d93;hp=054eac734f5afdc00f465b5826f344ea7f6d77a8;hb=a5d004b0773f633401528392fc28e66d70e13ac8;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 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 -#include #include #include #include @@ -174,13 +173,13 @@ Timeline::paint_main () gc->SetAntialiasMode (wxANTIALIAS_DEFAULT); - BOOST_FOREACH (shared_ptr i, _views) { + for (auto i: _views) { shared_ptr ic = dynamic_pointer_cast (i); /* Find areas of overlap with other content views, so that we can plot them */ list > overlaps; - BOOST_FOREACH (shared_ptr j, _views) { + for (auto j: _views) { shared_ptr jc = dynamic_pointer_cast (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 i, film->content ()) { + for (auto i: film->content ()) { if (i->video) { _views.push_back (shared_ptr (new TimelineVideoContentView (*this, i))); } @@ -260,7 +259,7 @@ Timeline::recreate_views () _views.push_back (shared_ptr (new TimelineAudioContentView (*this, i))); } - BOOST_FOREACH (shared_ptr j, i->text) { + for (auto j: i->text) { _views.push_back (shared_ptr (new TimelineTextContentView (*this, i, j))); } @@ -299,7 +298,7 @@ place (shared_ptr film, TimelineViewList& views, int& tracks) { int const base = tracks; - BOOST_FOREACH (shared_ptr i, views) { + for (auto i: views) { if (!dynamic_pointer_cast(i)) { continue; } @@ -396,7 +395,7 @@ Timeline::assign_tracks () /* Video */ bool have_3d = false; - BOOST_FOREACH (shared_ptr i, _views) { + for (auto i: _views) { shared_ptr cv = dynamic_pointer_cast (i); if (!cv) { continue; @@ -421,7 +420,7 @@ Timeline::assign_tracks () /* Atmos */ bool have_atmos = false; - BOOST_FOREACH (shared_ptr i, _views) { + for (auto i: _views) { shared_ptr cv = dynamic_pointer_cast(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); }