From 9655db97eae5a6137a45ad809dbf42528dc74408 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 4 Jul 2014 11:43:55 +0100 Subject: Add 'starting' option to subtitles_during(). --- src/lib/dcpomatic_time.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/dcpomatic_time.cc') diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc index dcdfd97da..fa6271354 100644 --- a/src/lib/dcpomatic_time.cc +++ b/src/lib/dcpomatic_time.cc @@ -55,3 +55,9 @@ ContentTimePeriod::overlaps (ContentTimePeriod const & other) const { return (from < other.to && to >= other.from); } + +bool +ContentTimePeriod::contains (ContentTime const & other) const +{ + return (from >= other && to < other); +} -- cgit v1.2.3