X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fmove_to_dialog.cc;h=fdd118520999b50a67367d9f637ec6180aefe24f;hb=8ccbe70f3c2f5db9e88978a98f3ad5735ece07ab;hp=b4b6e3ae3b08d34d98288b1d73f20812b4b76d9c;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/src/wx/move_to_dialog.cc b/src/wx/move_to_dialog.cc index b4b6e3ae3..fdd118520 100644 --- a/src/wx/move_to_dialog.cc +++ b/src/wx/move_to_dialog.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington + Copyright (C) 2016-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,16 +18,18 @@ */ + #include "move_to_dialog.h" #include "lib/film.h" #include -#include + using std::list; using std::shared_ptr; using boost::optional; using namespace dcpomatic; + MoveToDialog::MoveToDialog (wxWindow* parent, optional position, shared_ptr film) : TableDialog (parent, _("Move content"), 2, 0, true) , _film (film) @@ -41,7 +43,7 @@ MoveToDialog::MoveToDialog (wxWindow* parent, optional position, shared if (position) { int j = 0; - BOOST_FOREACH (DCPTimePeriod i, film->reels()) { + for (auto i: film->reels()) { if (i.from == position.get()) { _reel->SetValue (j + 1); } @@ -50,13 +52,14 @@ MoveToDialog::MoveToDialog (wxWindow* parent, optional position, shared } } + DCPTime MoveToDialog::position () const { - shared_ptr film = _film.lock (); + auto film = _film.lock (); DCPOMATIC_ASSERT (film); - list reels = film->reels (); - list::const_iterator i = reels.begin (); + auto reels = film->reels (); + auto i = reels.begin (); for (int j = 0; j < _reel->GetValue() - 1; ++j) { DCPOMATIC_ASSERT (i != reels.end()); ++i;