BOOST_FOREACH.
[dcpomatic.git] / src / tools / dcpomatic_kdm.cc
index aa7cf8340ab6efce401580f4397bb6a3a18025e5..3547d0f59209ba6cafbe261ca3bc4423eeb761a0 100644 (file)
@@ -58,8 +58,7 @@ DCPOMATIC_ENABLE_WARNINGS
 #ifdef __WXOSX__
 #include <ApplicationServices/ApplicationServices.h>
 #endif
-#include <boost/bind.hpp>
-#include <boost/foreach.hpp>
+#include <boost/bind/bind.hpp>
 
 #ifdef check
 #undef check
@@ -71,11 +70,11 @@ using std::string;
 using std::vector;
 using std::pair;
 using std::map;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::bind;
 using boost::optional;
 using boost::ref;
-using boost::dynamic_pointer_cast;
+using std::dynamic_pointer_cast;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
@@ -308,7 +307,7 @@ private:
                        list<KDMWithMetadataPtr> kdms;
                        string title;
 
-                       shared_ptr<DKDM> dkdm = boost::dynamic_pointer_cast<DKDM> (dkdm_base);
+                       shared_ptr<DKDM> dkdm = std::dynamic_pointer_cast<DKDM> (dkdm_base);
                        if (dkdm) {
 
                                /* Decrypt the DKDM */
@@ -321,7 +320,7 @@ private:
                                        throw InvalidSignerError ();
                                }
 
-                               BOOST_FOREACH (shared_ptr<Screen> i, _screens->screens()) {
+                               for (auto i: _screens->screens()) {
 
                                        if (!i->recipient) {
                                                continue;
@@ -340,7 +339,7 @@ private:
                                                );
 
                                        /* Add keys from the DKDM */
-                                       BOOST_FOREACH (dcp::DecryptedKDMKey const & j, decrypted.keys()) {
+                                       for (auto const& j: decrypted.keys()) {
                                                kdm.add_key (j);
                                        }
 
@@ -522,7 +521,7 @@ private:
                /* Add children */
                shared_ptr<DKDMGroup> g = dynamic_pointer_cast<DKDMGroup> (base);
                if (g) {
-                       BOOST_FOREACH (shared_ptr<DKDMBase> i, g->children()) {
+                       for (auto i: g->children()) {
                                add_dkdm_view (i);
                        }
                }
@@ -596,7 +595,7 @@ private:
        ScreensPanel* _screens;
        KDMTimingPanel* _timing;
        wxTreeCtrl* _dkdm;
-       typedef std::map<wxTreeItemId, boost::shared_ptr<DKDMBase> > DKDMMap;
+       typedef std::map<wxTreeItemId, std::shared_ptr<DKDMBase> > DKDMMap;
        DKDMMap _dkdm_id;
        wxButton* _add_dkdm;
        wxButton* _add_dkdm_folder;