diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-01 21:47:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-13 21:57:52 +0100 |
| commit | be9a270cdf3fe43126bc94e19aa06bb5a939aadf (patch) | |
| tree | 5c37d927d65540a946ea290e93f2f22ab7f964bd /src | |
| parent | 9e63c37ed41d2eb4fd321cf29ac6c682423f2bb6 (diff) | |
Add assert to make sure we're not comparing times wrongly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/local_time.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/local_time.cc b/src/local_time.cc index c8576584..1bedb9bd 100644 --- a/src/local_time.cc +++ b/src/local_time.cc @@ -281,6 +281,8 @@ LocalTime::operator== (LocalTime const & other) const bool LocalTime::operator< (LocalTime const & other) const { + DCP_ASSERT(_offset == other._offset); + if (_year != other._year) { return _year < other._year; } |
