mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Range: Corrected assert for open ranges
This commit is contained in:
parent
838961db4b
commit
f1db9559f9
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue