Disable warnings around all wx includes.
[dcpomatic.git] / src / wx / move_to_dialog.cc
index 266f44264c97f33e966ae6d3e68224f9f34a1aa4..db62297119ce28b7794552d295c781292de3d15a 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 "lib/warnings.h"
+DCPOMATIC_DISABLE_WARNINGS
 #include <wx/spinctrl.h>
-#include <boost/foreach.hpp>
+DCPOMATIC_ENABLE_WARNINGS
+
 
 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)
        , _film (film)
@@ -41,7 +46,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);
                        }
@@ -50,13 +55,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;