summaryrefslogtreecommitdiff
path: root/libs/timecode/timecode/bbt_time.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/timecode/timecode/bbt_time.h')
-rw-r--r--libs/timecode/timecode/bbt_time.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/timecode/timecode/bbt_time.h b/libs/timecode/timecode/bbt_time.h
index 46307dbc04..030ac18afc 100644
--- a/libs/timecode/timecode/bbt_time.h
+++ b/libs/timecode/timecode/bbt_time.h
@@ -46,6 +46,24 @@ struct BBT_Time {
(bars == other.bars && beats < other.beats) ||
(bars == other.bars && beats == other.beats && ticks < other.ticks);
}
+
+ bool operator<= (const BBT_Time& other) const {
+ return bars < other.bars ||
+ (bars <= other.bars && beats <= other.beats) ||
+ (bars <= other.bars && beats <= other.beats && ticks <= other.ticks);
+ }
+
+ bool operator> (const BBT_Time& other) const {
+ return bars > other.bars ||
+ (bars == other.bars && beats > other.beats) ||
+ (bars == other.bars && beats == other.beats && ticks > other.ticks);
+ }
+
+ bool operator>= (const BBT_Time& other) const {
+ return bars > other.bars ||
+ (bars >= other.bars && beats >= other.beats) ||
+ (bars >= other.bars && beats >= other.beats && ticks >= other.ticks);
+ }
bool operator== (const BBT_Time& other) const {
return bars == other.bars && beats == other.beats && ticks == other.ticks;