Range: Corrected assert for open ranges

This commit is contained in:
Paul Beckingham 2016-05-14 01:14:32 -04:00
parent 838961db4b
commit f1db9559f9

View file

@ -286,7 +286,7 @@ std::vector <Range> Range::subtract (const Range& other) const
// If the range is open, use 'now' as the end. // If the range is open, use 'now' as the end.
time_t Range::total () const time_t Range::total () const
{ {
assert (end >= start); assert (! is_ended () || end >= start);
if (is_ended ()) if (is_ended ())
return Datetime (end) - Datetime (start); return Datetime (end) - Datetime (start);