Use enum class for VideoRange.
[dcpomatic.git] / src / lib / overlaps.cc
index ccef4cef8ba0cd074b152dd371e7ee40d5ea4466..32801de39e5c0449a6b85fbb1de02b7c1a1c831b 100644 (file)
 #include "overlaps.h"
 #include "types.h"
 #include "content.h"
-#include <boost/foreach.hpp>
 
-using boost::shared_ptr;
+using std::shared_ptr;
 using boost::function;
+using namespace dcpomatic;
 
-ContentList overlaps (ContentList cl, function<shared_ptr<ContentPart> (shared_ptr<const Content>)> part, DCPTime from, DCPTime to)
+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);
                }
        }