From be9a270cdf3fe43126bc94e19aa06bb5a939aadf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 1 Dec 2022 21:47:09 +0100 Subject: Add assert to make sure we're not comparing times wrongly. --- src/local_time.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3