Merge identical time periods returned from text_subtitles_during
[dcpomatic.git] / src / lib / dcpomatic_time.h
index da903cf09316e0e34865e62a5443a7ff1ba5b64e..893bce2572e21752a1de59f6dcdb43f9eb8a0ca4 100644 (file)
@@ -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;
        }