summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-08-22 16:06:29 +0100
committerCarl Hetherington <cth@carlh.net>2016-08-22 16:06:29 +0100
commitc178a9d89e489e37cd1db73c6b0d470616937966 (patch)
tree78476fabe6dc23a47ea4bb1fafb0ba8d7d2294ba /src
parentfab8525a625f1ad65f2ddcfbf6ac6c7a99c36b0e (diff)
Fix ridiculous thinko in Time::operator{<,>}
Before this x < x and x > x were true.
Diffstat (limited to 'src')
-rw-r--r--src/dcp_time.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/dcp_time.cc b/src/dcp_time.cc
index d397d9d7..50946f4c 100644
--- a/src/dcp_time.cc
+++ b/src/dcp_time.cc
@@ -208,11 +208,7 @@ dcp::operator< (Time const & a, Time const & b)
return a.s < b.s;
}
- if ((a.e * b.tcr) != (b.e * a.tcr)) {
- return (a.e * b.tcr) < (b.e * a.tcr);
- }
-
- return true;
+ return (a.e * b.tcr) < (b.e * a.tcr);
}
bool
@@ -230,11 +226,7 @@ dcp::operator> (Time const & a, Time const & b)
return a.s > b.s;
}
- if ((a.e * b.tcr) != (b.e * a.tcr)) {
- return (a.e * b.tcr) > (b.e * a.tcr);
- }
-
- return true;
+ return (a.e * b.tcr) > (b.e * a.tcr);
}
ostream &