diff options
Diffstat (limited to 'src/frame_time.cc')
| -rw-r--r-- | src/frame_time.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/frame_time.cc b/src/frame_time.cc index 0bf63ad..726c552 100644 --- a/src/frame_time.cc +++ b/src/frame_time.cc @@ -31,6 +31,24 @@ sub::operator== (FrameTime const & a, FrameTime const & b) return a._hours == b._hours && a._minutes == b._minutes && a._seconds == b._seconds && a._frames == b._frames; } +bool +sub::operator< (FrameTime const & a, FrameTime const & b) +{ + if (a._hours != b._hours) { + return a._hours < b._hours; + } + + if (a._minutes != b._minutes) { + return a._minutes < b._minutes; + } + + if (a._seconds != b._seconds) { + return a._seconds < b._seconds; + } + + return a._frames < b._frames; +} + ostream& sub::operator<< (ostream& s, FrameTime const & t) { |
