Use enum class for VideoRange.
[dcpomatic.git] / src / lib / analyse_subtitles_job.cc
index 7a1c4ab00ff751572832a74475d0a9d1ec14e9a4..b941824d6382fa0744c8b9e826f3e7ea45777893 100644 (file)
 #include "i18n.h"
 
 using std::string;
-using boost::shared_ptr;
-using boost::weak_ptr;
+using std::shared_ptr;
+using std::weak_ptr;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
 
 AnalyseSubtitlesJob::AnalyseSubtitlesJob (shared_ptr<const Film> film, shared_ptr<Content> content)
        : Job (film)
@@ -91,7 +94,7 @@ AnalyseSubtitlesJob::analyse (PlayerText text, TextType type)
                return;
        }
 
-       BOOST_FOREACH (BitmapText const& i, text.bitmap) {
+       for (auto const& i: text.bitmap) {
                if (!_bounding_box) {
                        _bounding_box = i.rectangle;
                } else {
@@ -102,7 +105,7 @@ AnalyseSubtitlesJob::analyse (PlayerText text, TextType type)
        if (!text.string.empty()) {
                /* We can provide dummy values for time and frame rate here as they are only used to calculate fades */
                dcp::Size const frame = _film->frame_size();
-               BOOST_FOREACH (PositionImage i, render_text(text.string, text.fonts, frame, dcpomatic::DCPTime(), 24)) {
+               for (auto i: render_text(text.string, text.fonts, frame, dcpomatic::DCPTime(), 24)) {
                        dcpomatic::Rect<double> rect (
                                        double(i.position.x) / frame.width, double(i.position.y) / frame.height,
                                        double(i.image->size().width) / frame.width, double(i.image->size().height) / frame.height