From 30a00c5e9f43b8ba01a586bbeed20f06af7c2b18 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 25 Sep 2021 16:40:49 -0600 Subject: [PATCH] Fix implementation of timecnt_t::operator==() to compare both duration and position --- libs/temporal/temporal/timeline.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/temporal/temporal/timeline.h b/libs/temporal/temporal/timeline.h index 0d5354ea49..609d508619 100644 --- a/libs/temporal/temporal/timeline.h +++ b/libs/temporal/temporal/timeline.h @@ -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.