/*
- Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#include "overlaps.h"
#include "types.h"
#include "content.h"
-#include <boost/foreach.hpp>
-using boost::shared_ptr;
-using boost::function;
-ContentList overlaps (ContentList cl, function<shared_ptr<ContentPart> (shared_ptr<const Content>)> part, DCPTime from, DCPTime to)
+using std::function;
+using std::shared_ptr;
+using namespace dcpomatic;
+
+
+ContentList overlaps (shared_ptr<const Film> film, ContentList cl, function<bool (shared_ptr<const Content>)> part, DCPTime from, DCPTime to)
{
ContentList overlaps;
DCPTimePeriod period (from, to);
- BOOST_FOREACH (shared_ptr<Content> i, cl) {
- if (part(i) && DCPTimePeriod(i->position(), i->end()).overlap(period)) {
+ for (auto i: cl) {
+ if (part(i) && DCPTimePeriod(i->position(), i->end(film)).overlap(period)) {
overlaps.push_back (i);
}
}