summaryrefslogtreecommitdiff
path: root/src/wx/content_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-01-04 21:32:13 +0100
committerCarl Hetherington <cth@carlh.net>2021-01-07 23:27:56 +0100
commita5d004b0773f633401528392fc28e66d70e13ac8 (patch)
tree9f83ff2ab353f5a63918210d4930d0ead228375e /src/wx/content_panel.cc
parentdd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (diff)
BOOST_FOREACH.
Diffstat (limited to 'src/wx/content_panel.cc')
-rw-r--r--src/wx/content_panel.cc31
1 files changed, 15 insertions, 16 deletions
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);
}
}