std::shared_ptr
[dcpomatic.git] / src / lib / overlaps.cc
index 9e1b2751763484adc3c3e32b866251b6c75d681e..f5ccd48d0276db1153e1129f7e2ca1633bd2bbd9 100644 (file)
 #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()).overlaps (period)) {
+               if (part(i) && DCPTimePeriod(i->position(), i->end(film)).overlap(period)) {
                        overlaps.push_back (i);
                }
        }