projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BOOST_FOREACH.
[dcpomatic.git]
/
src
/
lib
/
job.cc
diff --git
a/src/lib/job.cc
b/src/lib/job.cc
index 0feda64355fd95cc0e2d18472c7305cd94b6ec86..f0d8fcbbc1d4554dc920924cfdae43bdb0f4c01a 100644
(file)
--- a/
src/lib/job.cc
+++ b/
src/lib/job.cc
@@
-34,7
+34,6
@@
#include <sub/exceptions.h>
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
#include <sub/exceptions.h>
#include <boost/thread.hpp>
#include <boost/filesystem.hpp>
-#include <boost/foreach.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <iostream>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <iostream>
@@
-43,7
+42,7
@@
using std::string;
using std::list;
using std::cout;
using std::string;
using std::list;
using std::cout;
-using
boost
::shared_ptr;
+using
std
::shared_ptr;
using boost::optional;
using boost::function;
using namespace dcpomatic;
using boost::optional;
using boost::function;
using namespace dcpomatic;
@@
-71,16
+70,12
@@
Job::~Job ()
void
Job::stop_thread ()
{
void
Job::stop_thread ()
{
- if (!_thread.joinable()) {
- return;
- }
+ boost::this_thread::disable_interruption dis;
_thread.interrupt ();
try {
_thread.join ();
_thread.interrupt ();
try {
_thread.join ();
- } catch (...) {
- /* Too late to do anything about this */
- }
+ } catch (...) {}
}
/** Start the job in a separate thread, returning immediately */
}
/** Start the job in a separate thread, returning immediately */
@@
-200,7
+195,7
@@
Job::run_wrapper ()
} catch (sub::SubripError& e) {
string extra = "Error is near:\n";
} catch (sub::SubripError& e) {
string extra = "Error is near:\n";
-
BOOST_FOREACH (string i,
e.context()) {
+
for (auto i:
e.context()) {
extra += i + "\n";
}
extra += i + "\n";
}