More c++ tidying.
[dcpomatic.git] / src / lib / subtitle_encoder.cc
index 473d0698b2d6a80a8d59e1b8d00eefbdeff2cb01..cc42f1204e78c860b21e0ba623b494def2ed3124 100644 (file)
@@ -26,7 +26,6 @@
 #include <dcp/interop_subtitle_asset.h>
 #include <dcp/raw_convert.h>
 #include <dcp/smpte_subtitle_asset.h>
-#include <boost/shared_ptr.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/bind/bind.hpp>
 
@@ -36,7 +35,7 @@ using std::string;
 using std::make_pair;
 using std::pair;
 using std::vector;
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::optional;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
@@ -78,7 +77,7 @@ SubtitleEncoder::SubtitleEncoder (shared_ptr<const Film> film, shared_ptr<Job> j
                _assets.push_back (make_pair(shared_ptr<dcp::SubtitleAsset>(), boost::filesystem::change_extension(filename, extension)));
        }
 
-       BOOST_FOREACH (dcpomatic::DCPTimePeriod i, film->reels()) {
+       for (auto i: film->reels()) {
                _reels.push_back (i);
        }
 
@@ -116,7 +115,7 @@ SubtitleEncoder::go ()
                }
 
                if (!_film->interop() || _include_font) {
-                       BOOST_FOREACH (dcpomatic::FontData j, _player->get_subtitle_fonts()) {
+                       for (auto j: _player->get_subtitle_fonts()) {
                                i->first->add_font (j.id, _default_font);
                        }
                }
@@ -163,7 +162,7 @@ SubtitleEncoder::text (PlayerText subs, TextType type, optional<DCPTextTrack> tr
                }
        }
 
-       BOOST_FOREACH (StringText i, subs.string) {
+       for (auto i: subs.string) {
                /* XXX: couldn't / shouldn't we use period here rather than getting time from the subtitle? */
                i.set_in  (i.in());
                i.set_out (i.out());