From 747281a244906e55cc802eeae9bb2aa6944f6b94 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 8 Dec 2020 20:32:32 -0700 Subject: [PATCH] Temporal: fix implementation of timecnt_t::operator= (timecnt_t const &) It is OK now to have inconsistent time domains inside a timecnt_t --- libs/temporal/temporal/timeline.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/temporal/temporal/timeline.h b/libs/temporal/temporal/timeline.h index d160726b41..5cc3b41d8d 100644 --- a/libs/temporal/temporal/timeline.h +++ b/libs/temporal/temporal/timeline.h @@ -375,15 +375,10 @@ class LIBTEMPORAL_API timecnt_t { bool operator< (timecnt_t const & other) const { if (_distance.flagged() == other.distance().flagged()) return _distance < other.distance(); else return expensive_lt (other); } bool operator<= (timecnt_t const & other) const { if (_distance.flagged() == other.distance().flagged()) return _distance <= other.distance(); else return expensive_gte (other); } - timecnt_t & operator=(timecnt_t const & other) { + timecnt_t & operator= (timecnt_t const & other) { if (this != &other) { - if (_distance.flagged() == other.distance().flagged()) { - _distance = other.distance(); - } else { - /* unclear what to do here but we cannot allow - inconsistent timecnt_t to be created - */ - } + _distance = other.distance(); + _position = other.position(); } return *this; }