summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-04 11:43:55 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-04 11:43:55 +0100
commit9655db97eae5a6137a45ad809dbf42528dc74408 (patch)
tree178ecd2e313ceb6aa7d11fbadb950c53381f1280 /src/lib/dcpomatic_time.cc
parentc88a8a6ec6b396dc90d40a4843160d616a45db76 (diff)
Add 'starting' option to subtitles_during().
Diffstat (limited to 'src/lib/dcpomatic_time.cc')
-rw-r--r--src/lib/dcpomatic_time.cc6
1 files changed, 6 insertions, 0 deletions
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);
+}