diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-10-23 23:27:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-10-23 23:27:49 +0100 |
| commit | 2603c3c5d94ce5e300337d71eeabb56ff3f55fc4 (patch) | |
| tree | 464faf21e291a14be323dbc254112778e1ff00a2 /src/lib/dcpomatic_time.h | |
| parent | bb1eb89a4e4318a63f509a213216da5fdc1937b9 (diff) | |
Merge identical time periods returned from text_subtitles_during
to stop multiple copies of subtitles being returned from the decoder.
Diffstat (limited to 'src/lib/dcpomatic_time.h')
| -rw-r--r-- | src/lib/dcpomatic_time.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h index da903cf09..893bce257 100644 --- a/src/lib/dcpomatic_time.h +++ b/src/lib/dcpomatic_time.h @@ -272,6 +272,13 @@ public: return (from <= other && other < to); } + bool operator< (TimePeriod<T> const & o) const { + if (from != o.from) { + return from < o.from; + } + return to < o.to; + } + bool operator== (TimePeriod<T> const & other) const { return from == other.from && to == other.to; } |
