summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-11-05 00:43:00 +0100
committerCarl Hetherington <cth@carlh.net>2021-11-05 00:43:00 +0100
commit5d1496fa502655d334439b4b2658625a2b3c1b70 (patch)
treedefaa6e2074a4e3fd93dae5c3899c51a12866a65 /src/wx
parentd50c23b8ddc05953322d2d0eb6ca5cb8ad88645f (diff)
C++11 tidying.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/content_panel.cc2
-rw-r--r--src/wx/content_properties_dialog.h2
-rw-r--r--src/wx/content_widget.h14
-rw-r--r--src/wx/text_panel.cc2
-rw-r--r--src/wx/timeline.cc2
-rw-r--r--src/wx/timeline_content_view.cc6
-rw-r--r--src/wx/timeline_time_axis_view.cc2
-rw-r--r--src/wx/timeline_time_axis_view.h2
-rw-r--r--src/wx/wx_util.cc2
-rw-r--r--src/wx/wx_util.h2
10 files changed, 18 insertions, 18 deletions
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index ceebd6e14..b2b72b216 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -473,7 +473,7 @@ ContentPanel::add_folder_clicked ()
return;
}
- list<shared_ptr<Content> > content;
+ list<shared_ptr<Content>> content;
try {
content = content_factory (path);
diff --git a/src/wx/content_properties_dialog.h b/src/wx/content_properties_dialog.h
index c7efa4497..f8e8eaf2f 100644
--- a/src/wx/content_properties_dialog.h
+++ b/src/wx/content_properties_dialog.h
@@ -36,5 +36,5 @@ public:
ContentPropertiesDialog (wxWindow* parent, std::shared_ptr<const Film> film, std::shared_ptr<Content> content);
private:
- void maybe_add_group (std::map<UserProperty::Category, std::list<UserProperty> > const & groups, UserProperty::Category category);
+ void maybe_add_group (std::map<UserProperty::Category, std::list<UserProperty>> const & groups, UserProperty::Category category);
};
diff --git a/src/wx/content_widget.h b/src/wx/content_widget.h
index 34755e4b5..782b339a7 100644
--- a/src/wx/content_widget.h
+++ b/src/wx/content_widget.h
@@ -92,13 +92,13 @@ public:
return _wrapped;
}
- typedef std::vector<std::shared_ptr<Content> > List;
+ typedef std::vector<std::shared_ptr<Content>> List;
/** Set the content that this control is working on (i.e. the selected content) */
void set_content (List content)
{
- for (typename std::list<boost::signals2::connection>::iterator i = _connections.begin(); i != _connections.end(); ++i) {
- i->disconnect ();
+ for (auto& i: _connections) {
+ i.disconnect ();
}
_connections.clear ();
@@ -109,11 +109,11 @@ public:
update_from_model ();
- for (typename List::iterator i = _content.begin(); i != _content.end(); ++i) {
+ for (auto i: _content) {
#if BOOST_VERSION >= 106100
- _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3)));
+ _connections.push_back (i->Change.connect(boost::bind(&ContentWidget::model_changed, this, boost::placeholders::_1, boost::placeholders::_3)));
#else
- _connections.push_back ((*i)->Change.connect (boost::bind (&ContentWidget::model_changed, this, _1, _3)));
+ _connections.push_back (i->Change.connect(boost::bind(&ContentWidget::model_changed, this, _1, _3)));
#endif
}
}
@@ -135,7 +135,7 @@ public:
return;
}
- typename List::iterator i = _content.begin ();
+ auto i = _content.begin ();
U const v = boost::bind (_model_getter, _part(_content.front().get()).get())();
while (i != _content.end() && boost::bind (_model_getter, _part(i->get()).get())() == v) {
++i;
diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc
index 7bbead30c..715503b6a 100644
--- a/src/wx/text_panel.cc
+++ b/src/wx/text_panel.cc
@@ -874,7 +874,7 @@ TextPanel::update_outline_subtitles_in_viewer ()
}
fv->set_outline_subtitles (rect);
} else {
- fv->set_outline_subtitles (optional<dcpomatic::Rect<double> >());
+ fv->set_outline_subtitles ({});
}
}
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index 359de9bf9..1c5937ae0 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -152,7 +152,7 @@ Timeline::paint_labels ()
_labels_canvas->GetViewStart (&vsx, &vsy);
gc->Translate (-vsx * _x_scroll_rate, -vsy * _y_scroll_rate + tracks_y_offset());
- _labels_view->paint (gc, list<dcpomatic::Rect<int> >());
+ _labels_view->paint (gc, {});
delete gc;
}
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc
index 677b83bdd..481e8100d 100644
--- a/src/wx/timeline_content_view.cc
+++ b/src/wx/timeline_content_view.cc
@@ -95,7 +95,7 @@ TimelineContentView::track () const
}
void
-TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> > overlaps)
+TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>> overlaps)
{
DCPOMATIC_ASSERT (_track);
@@ -105,8 +105,8 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>
return;
}
- DCPTime const position = cont->position ();
- DCPTime const len = cont->length_after_trim (film);
+ auto const position = cont->position ();
+ auto const len = cont->length_after_trim (film);
wxColour selected (background_colour().Red() / 2, background_colour().Green() / 2, background_colour().Blue() / 2);
diff --git a/src/wx/timeline_time_axis_view.cc b/src/wx/timeline_time_axis_view.cc
index e9de1b542..cd0b97d19 100644
--- a/src/wx/timeline_time_axis_view.cc
+++ b/src/wx/timeline_time_axis_view.cc
@@ -50,7 +50,7 @@ TimelineTimeAxisView::set_y (int y)
}
void
-TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >)
+TimelineTimeAxisView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int>>)
{
if (!_timeline.pixels_per_second()) {
return;
diff --git a/src/wx/timeline_time_axis_view.h b/src/wx/timeline_time_axis_view.h
index 5477e61f1..100228ae8 100644
--- a/src/wx/timeline_time_axis_view.h
+++ b/src/wx/timeline_time_axis_view.h
@@ -29,7 +29,7 @@ public:
void set_y (int y);
private:
- void do_paint (wxGraphicsContext* gc, std::list<dcpomatic::Rect<int> > overlaps);
+ void do_paint (wxGraphicsContext* gc, std::list<dcpomatic::Rect<int>> overlaps);
int _y; ///< y position in tracks (not pixels)
};
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index a0beb8f72..47b381562 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -297,7 +297,7 @@ checked_set (wxChoice* widget, string value)
void
-checked_set (wxChoice* widget, vector<pair<string, string> > items)
+checked_set (wxChoice* widget, vector<pair<string, string>> items)
{
vector<pair<string, string>> current;
for (unsigned int i = 0; i < widget->GetCount(); ++i) {
diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h
index 585a30611..3fa2ebe25 100644
--- a/src/wx/wx_util.h
+++ b/src/wx/wx_util.h
@@ -144,7 +144,7 @@ extern void checked_set (wxSpinCtrl* widget, int value);
extern void checked_set (wxSpinCtrlDouble* widget, double value);
extern void checked_set (wxChoice* widget, int value);
extern void checked_set (wxChoice* widget, std::string value);
-extern void checked_set (wxChoice* widget, std::vector<std::pair<std::string, std::string> > items);
+extern void checked_set (wxChoice* widget, std::vector<std::pair<std::string, std::string>> items);
extern void checked_set (wxTextCtrl* widget, std::string value);
extern void checked_set (wxTextCtrl* widget, wxString value);
extern void checked_set (PasswordEntry* widget, std::string value);