diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-04 21:32:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-07 23:27:56 +0100 |
| commit | a5d004b0773f633401528392fc28e66d70e13ac8 (patch) | |
| tree | 9f83ff2ab353f5a63918210d4930d0ead228375e /src/lib/render_text.cc | |
| parent | dd9be86db6cde0afa5da0d1d1ac43b42e05dca26 (diff) | |
BOOST_FOREACH.
Diffstat (limited to 'src/lib/render_text.cc')
| -rw-r--r-- | src/lib/render_text.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc index 3129c220f..3dc1e9ff0 100644 --- a/src/lib/render_text.cc +++ b/src/lib/render_text.cc @@ -36,7 +36,6 @@ DCPOMATIC_ENABLE_WARNINGS #ifndef DCPOMATIC_HAVE_SHOW_IN_CAIRO_CONTEXT #include <pango/pangocairo.h> #endif -#include <boost/foreach.hpp> #include <boost/algorithm/string.hpp> #include <iostream> @@ -61,7 +60,7 @@ marked_up (list<StringText> subtitles, int target_height, float fade_factor) { string out; - BOOST_FOREACH (StringText const & i, subtitles) { + for (auto const& i: subtitles) { out += "<span "; if (i.italic()) { out += "style=\"italic\" "; @@ -142,7 +141,7 @@ setup_font (StringText const& subtitle, list<shared_ptr<Font> > const& fonts) optional<boost::filesystem::path> font_file = default_font_file (); - BOOST_FOREACH (shared_ptr<Font> i, fonts) { + for (auto i: fonts) { if (i->id() == subtitle.font() && i->file()) { font_file = i->file (); } @@ -404,7 +403,7 @@ render_text (list<StringText> subtitles, list<shared_ptr<Font> > fonts, dcp::Siz list<StringText> pending; list<PositionImage> images; - BOOST_FOREACH (StringText const & i, subtitles) { + for (auto const& i: subtitles) { if (!pending.empty() && (i.v_align() != pending.back().v_align() || fabs(i.v_position() - pending.back().v_position()) > 1e-4)) { images.push_back (render_line (pending, fonts, target, time, frame_rate)); pending.clear (); |
