13
0

Fix implementation of timecnt_t::operator==() to compare both duration and position

This commit is contained in:
Paul Davis 2021-09-25 16:40:49 -06:00
parent 43c7a39f18
commit 30a00c5e9f

View File

@ -389,8 +389,8 @@ class LIBTEMPORAL_API timecnt_t {
return *this;
}
bool operator!= (timecnt_t const & other) const { return _distance != other.distance(); }
bool operator== (timecnt_t const & other) const { return _distance == other.distance(); }
bool operator!= (timecnt_t const & other) const { return _distance != other.distance() || _position != other.position(); }
bool operator== (timecnt_t const & other) const { return _distance == other.distance() && _position == other.position(); }
/* test for numerical equivalence with a timepos_T. This tests ONLY the
duration in the given domain, NOT position.