X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Foverlaps.cc;h=fbc6b5cb1813c7646950f554c25cc952f8e6a5d0;hb=67cc6717aeb5f3b96448b206d1b85d68cbb26767;hp=ccef4cef8ba0cd074b152dd371e7ee40d5ea4466;hpb=9c01623c3038b978ba732de2ad147d29fad60afe;p=dcpomatic.git diff --git a/src/lib/overlaps.cc b/src/lib/overlaps.cc index ccef4cef8..fbc6b5cb1 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,22 @@ */ -#include "overlaps.h" -#include "types.h" + #include "content.h" -#include +#include "overlaps.h" + + +using std::function; +using std::shared_ptr; +using namespace dcpomatic; -using boost::shared_ptr; -using boost::function; -ContentList overlaps (ContentList cl, function (shared_ptr)> part, DCPTime from, DCPTime to) +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()).overlap(period)) { + for (auto i: cl) { + if (part(i) && i->period(film).overlap(period)) { overlaps.push_back (i); } }