diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-12-23 22:29:44 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-12-23 22:29:44 +0000 |
| commit | 6f125b65d1bc0650735624d7ada17a2ff573cbc4 (patch) | |
| tree | c37d69892f5d0fe244991f66110243caa030de8d /src/dcp_time.cc | |
| parent | 2e25fdc885226110c0ab28b3c8026e3dc4345cb5 (diff) | |
Some missed bits from 0.x.
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 |
