Add assert to make sure we're not comparing times wrongly.
authorCarl Hetherington <cth@carlh.net>
Thu, 1 Dec 2022 20:47:09 +0000 (21:47 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 13 Dec 2022 20:57:52 +0000 (21:57 +0100)
src/local_time.cc

index c857658474034e422708361b6b97773f30b77b85..1bedb9bd0c0841d92ec30552bf995b0927a00db4 100644 (file)
@@ -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;
        }