Temporal: fix implementation of timecnt_t::operator= (timecnt_t const &)
It is OK now to have inconsistent time domains inside a timecnt_t
This commit is contained in:
parent
3900537fcf
commit
747281a244
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user