diff options
author | David Robillard <d@drobilla.net> | 2010-12-17 02:44:15 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-17 02:44:15 +0000 |
commit | 837d8967ec86611ffc7336cf56fae5e87cee08b2 (patch) | |
tree | 5a29890eb26e62cb58ac967e57e8c9afa1f906fe | |
parent | 44de8f1841b6e74b8bd8a4e8eaeef1447b7037ac (diff) | |
download | raul-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
-rw-r--r-- | raul/TimeStamp.hpp | 14 |
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) { |