diff options
Diffstat (limited to 'src/dcp_time.cc')
| -rw-r--r-- | src/dcp_time.cc | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/dcp_time.cc b/src/dcp_time.cc index 9ce36764..4033e5dd 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -99,23 +99,13 @@ dcp::operator!= (Time const & a, Time const & b) bool dcp::operator<= (Time const & a, Time const & b) { - if (a.h != b.h) { - return a.h <= b.h; - } - - if (a.m != b.m) { - return a.m <= b.m; - } - - if (a.s != b.s) { - return a.s <= b.s; - } - - if (a.t != b.t) { - return a.t <= b.t; - } + return a < b || a == b; +} - return true; +bool +dcp::operator>= (Time const & a, Time const & b) +{ + return a > b || a == b; } bool |
