BOOST_FOREACH.
[dcpomatic.git] / src / lib / verify_dcp_job.cc
index 908cd53a7f14d3ae8ad8665a3874d480ebc1661e..bbcce720893ccd794909e72f9249819fb9e4e234 100644 (file)
 
 using std::string;
 using std::vector;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::optional;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
 
 VerifyDCPJob::VerifyDCPJob (vector<boost::filesystem::path> directories)
        : Job (shared_ptr<Film>())
@@ -36,6 +39,11 @@ VerifyDCPJob::VerifyDCPJob (vector<boost::filesystem::path> directories)
 
 }
 
+VerifyDCPJob::~VerifyDCPJob ()
+{
+       stop_thread ();
+}
+
 string
 VerifyDCPJob::name () const
 {
@@ -60,10 +68,10 @@ VerifyDCPJob::update_stage (string s, optional<boost::filesystem::path> path)
 void
 VerifyDCPJob::run ()
 {
-       _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), shared_path() / "xsd");
+       _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), xsd_path());
 
        bool failed = false;
-       BOOST_FOREACH (dcp::VerificationNote i, _notes) {
+       for (auto i: _notes) {
                if (i.type() == dcp::VerificationNote::VERIFY_ERROR) {
                        failed = true;
                }