diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-07 15:02:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-14 10:21:13 +0100 |
| commit | 4704d088ae03ab2b5f73ceed577fd84935ad0640 (patch) | |
| tree | df66d16a04bb76dff4d4cddc35eda01a7aa6033d /src/wx/timeline.cc | |
| parent | 38e9419ea023224b21577d906084bbb3501e8aea (diff) | |
Some use of BOOST_FOREACH.
Diffstat (limited to 'src/wx/timeline.cc')
| -rw-r--r-- | src/wx/timeline.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 9a9dfc26d..12fd738eb 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -32,6 +32,7 @@ #include "lib/subtitle_content.h" #include <wx/graphics.h> #include <boost/weak_ptr.hpp> +#include <boost/foreach.hpp> #include <list> using std::list; @@ -111,19 +112,17 @@ Timeline::recreate_views () _views.clear (); _views.push_back (_time_axis_view); - ContentList content = film->content (); - - for (ContentList::iterator i = content.begin(); i != content.end(); ++i) { - if (dynamic_pointer_cast<VideoContent> (*i)) { - _views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, *i))); + BOOST_FOREACH (shared_ptr<Content> i, film->content ()) { + if (dynamic_pointer_cast<VideoContent> (i)) { + _views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, i))); } - shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (*i); + shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (i); if (ac && !ac->audio_mapping().mapped_output_channels().empty ()) { - _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, *i))); + _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i))); } - shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (*i); + shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (i); if (sc && sc->has_subtitles ()) { _views.push_back (shared_ptr<TimelineView> (new TimelineSubtitleContentView (*this, sc))); } |
