summaryrefslogtreecommitdiff
path: root/src/lib/dcpomatic_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/dcpomatic_time.h')
-rw-r--r--src/lib/dcpomatic_time.h7
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;
}