X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Foverlaps.cc;h=7a541a7c292ec6b8c271b5f7604826de03b66365;hb=1a721b82d4094c00ee89574e17c58c23c0de8cdd;hp=9e1b2751763484adc3c3e32b866251b6c75d681e;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/overlaps.cc b/src/lib/overlaps.cc index 9e1b27517..7a541a7c2 100644 --- a/src/lib/overlaps.cc +++ b/src/lib/overlaps.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,20 +18,23 @@ */ + +#include "content.h" #include "overlaps.h" #include "types.h" -#include "content.h" -#include -using boost::shared_ptr; -using boost::function; -ContentList overlaps (ContentList cl, function (shared_ptr)> part, DCPTime from, DCPTime to) +using std::function; +using std::shared_ptr; +using namespace dcpomatic; + + +ContentList overlaps (shared_ptr film, ContentList cl, function)> part, DCPTime from, DCPTime to) { ContentList overlaps; DCPTimePeriod period (from, to); - BOOST_FOREACH (shared_ptr i, cl) { - if (part(i) && DCPTimePeriod(i->position(), i->end()).overlaps (period)) { + for (auto i: cl) { + if (part(i) && DCPTimePeriod(i->position(), i->end(film)).overlap(period)) { overlaps.push_back (i); } }