summaryrefslogtreecommitdiffstats
path: root/raul/TimeStamp.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-17 02:44:15 +0000
committerDavid Robillard <d@drobilla.net>2010-12-17 02:44:15 +0000
commit837d8967ec86611ffc7336cf56fae5e87cee08b2 (patch)
tree5a29890eb26e62cb58ac967e57e8c9afa1f906fe /raul/TimeStamp.hpp
parent44de8f1841b6e74b8bd8a4e8eaeef1447b7037ac (diff)
downloadraul-837d8967ec86611ffc7336cf56fae5e87cee08b2.tar.gz
raul-837d8967ec86611ffc7336cf56fae5e87cee08b2.tar.bz2
raul-837d8967ec86611ffc7336cf56fae5e87cee08b2.zip
Fix TimeStamp comparison.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@2731 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'raul/TimeStamp.hpp')
-rw-r--r--raul/TimeStamp.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/raul/TimeStamp.hpp b/raul/TimeStamp.hpp
index a73331e..7ce9d95 100644
--- a/raul/TimeStamp.hpp
+++ b/raul/TimeStamp.hpp
@@ -135,18 +135,18 @@ public:
|| (_ticks == rhs._ticks && _subticks < rhs._subticks));
}
- inline bool operator<=(const TimeStamp& rhs) const {
+ inline bool operator>(const TimeStamp& rhs) const {
assert(_unit == rhs._unit);
- return (_ticks <= rhs._ticks
- || (_ticks == rhs._ticks && _subticks <= rhs._subticks));
+ return (_ticks > rhs._ticks
+ || (_ticks == rhs._ticks && _subticks > rhs._subticks));
}
- inline bool operator>=(const TimeStamp& rhs) const {
- return ! (rhs < *this);
+ inline bool operator<=(const TimeStamp& rhs) const {
+ return (*this == rhs) || ((*this) < rhs);
}
- inline bool operator>(const TimeStamp& rhs) const {
- return ! (rhs <= *this);
+ inline bool operator>=(const TimeStamp& rhs) const {
+ return (*this == rhs) || ((*this) > rhs);
}
inline TimeStamp& operator+=(const TimeStamp& rhs) {