X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcpomatic_time.cc;h=812c756ec27891224495b1a57b3e374ee793321d;hb=04eebe07e2f64bd15f6887a10ab51fb92c52901a;hp=ae4dea44f5c0752f6b387365713f772336e8d867;hpb=f1d30fb114b3b2c6ccd8fdf5823e7cd6b26c1eef;p=dcpomatic.git diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc index ae4dea44f..812c756ec 100644 --- a/src/lib/dcpomatic_time.cc +++ b/src/lib/dcpomatic_time.cc @@ -53,5 +53,11 @@ operator<< (ostream& s, DCPTime t) bool ContentTimePeriod::overlaps (ContentTimePeriod const & other) const { - return (from < other.to && to > other.from); + return (from < other.to && to >= other.from); +} + +bool +ContentTimePeriod::contains (ContentTime const & other) const +{ + return (from <= other && other < to); }