X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Factive_text.cc;h=1180ce7b0bc42f3c6b1deb7ef1fb0fdbb789eecd;hb=c7916079e06d985121842962b9736a6673e22dfe;hp=3a7e1a27ebeff7a43e63877e65416fc82b102bb0;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566;p=dcpomatic.git diff --git a/src/lib/active_text.cc b/src/lib/active_text.cc index 3a7e1a27e..1180ce7b0 100644 --- a/src/lib/active_text.cc +++ b/src/lib/active_text.cc @@ -18,16 +18,16 @@ */ + #include "active_text.h" #include "text_content.h" -#include -#include + using std::list; using std::pair; using std::make_pair; -using boost::weak_ptr; -using boost::shared_ptr; +using std::weak_ptr; +using std::shared_ptr; using boost::optional; using namespace dcpomatic; @@ -54,7 +54,7 @@ ActiveText::get_burnt (DCPTimePeriod period, bool always_burn_captions) const continue; } - BOOST_FOREACH (Period j, i->second) { + for (auto j: i->second) { DCPTimePeriod test (j.from, j.to.get_value_or(DCPTime::max())); optional overlap = period.overlap (test); if (overlap && overlap->duration() > DCPTime(period.duration().get() / 2)) { @@ -77,7 +77,7 @@ ActiveText::clear_before (DCPTime time) Map updated; for (Map::const_iterator i = _data.begin(); i != _data.end(); ++i) { list as; - BOOST_FOREACH (Period j, i->second) { + for (auto j: i->second) { if (!j.to || j.to.get() >= time) { as.push_back (j); } @@ -119,7 +119,7 @@ ActiveText::add_to (weak_ptr content, DCPTime to) _data[content].back().to = to; - BOOST_FOREACH (StringText& i, _data[content].back().subs.string) { + for (auto& i: _data[content].back().subs.string) { i.set_out (dcp::Time(to.seconds(), 1000)); }