X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Ftimeline_content_view.cc;fp=src%2Fwx%2Ftimeline_content_view.cc;h=bb84d6147fe50e1b22f4a74145e3eac80c73257a;hp=8258a81f97a5bfd6dd37e8485a3a5b2cef29ba71;hb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;hpb=4985d87750c87019dfe5dc7ef44e12c45326dd0e diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc index 8258a81f9..bb84d6147 100644 --- a/src/wx/timeline_content_view.cc +++ b/src/wx/timeline_content_view.cc @@ -44,10 +44,10 @@ TimelineContentView::bbox () const { DCPOMATIC_ASSERT (_track); - shared_ptr film = _timeline.film (); - shared_ptr content = _content.lock (); + auto film = _timeline.film (); + auto content = _content.lock (); if (!film || !content) { - return dcpomatic::Rect (); + return {}; } return dcpomatic::Rect ( @@ -86,7 +86,7 @@ TimelineContentView::set_track (int t) void TimelineContentView::unset_track () { - _track = boost::optional (); + _track = boost::optional(); } boost::optional @@ -100,8 +100,8 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list { DCPOMATIC_ASSERT (_track); - shared_ptr film = _timeline.film (); - shared_ptr cont = content (); + auto film = _timeline.film (); + auto cont = content (); if (!film || !cont) { return; } @@ -119,7 +119,7 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list } /* Outline */ - wxGraphicsPath path = gc->CreatePath (); + auto path = gc->CreatePath (); path.MoveToPoint (time_x (position) + 2, y_pos (_track.get()) + 4); path.AddLineToPoint (time_x (position + len) - 1, y_pos (_track.get()) + 4); path.AddLineToPoint (time_x (position + len) - 1, y_pos (_track.get() + 1) - 4); @@ -139,12 +139,12 @@ TimelineContentView::do_paint (wxGraphicsContext* gc, list /* Overlaps */ gc->SetBrush (*wxTheBrushList->FindOrCreateBrush (foreground_colour(), wxBRUSHSTYLE_CROSSDIAG_HATCH)); - for (list >::const_iterator i = overlaps.begin(); i != overlaps.end(); ++i) { - gc->DrawRectangle (i->x, i->y + 4, i->width, i->height - 8); + for (auto const& i: overlaps) { + gc->DrawRectangle (i.x, i.y + 4, i.width, i.height - 8); } /* Label text */ - wxString lab = label (); + auto lab = label (); wxDouble lab_width; wxDouble lab_height; wxDouble lab_descent; @@ -166,7 +166,7 @@ TimelineContentView::y_pos (int t) const void TimelineContentView::content_change (ChangeType type, int p) { - if (type != CHANGE_TYPE_DONE) { + if (type != ChangeType::DONE) { return; }