Fix alignment.
[dcpomatic.git] / src / wx / move_to_dialog.cc
index cb3db90cca14f00e97bc7a3785da681c8e360ff8..fdd118520999b50a67367d9f637ec6180aefe24f 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "move_to_dialog.h"
 #include "lib/film.h"
 #include <wx/spinctrl.h>
-#include <boost/foreach.hpp>
+
 
 using std::list;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::optional;
+using namespace dcpomatic;
+
 
 MoveToDialog::MoveToDialog (wxWindow* parent, optional<DCPTime> position, shared_ptr<const Film> film)
        : TableDialog (parent, _("Move content"), 2, 0, true)
@@ -40,7 +43,7 @@ MoveToDialog::MoveToDialog (wxWindow* parent, optional<DCPTime> 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);
                        }
@@ -49,13 +52,14 @@ MoveToDialog::MoveToDialog (wxWindow* parent, optional<DCPTime> position, shared
        }
 }
 
+
 DCPTime
 MoveToDialog::position () const
 {
-       shared_ptr<const Film> film = _film.lock ();
+       auto film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       list<DCPTimePeriod> reels = film->reels ();
-       list<DCPTimePeriod>::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;