mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Small refactoring on class Range
This commit is contained in:
parent
3aa932eafe
commit
3100ed4b6f
1 changed files with 2 additions and 3 deletions
|
@ -78,8 +78,7 @@ void Range::close ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
bool Range::is_open () const
|
||||
{
|
||||
return start.toEpoch () > 0 &&
|
||||
end.toEpoch () == 0;
|
||||
return is_started () && ! is_ended ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -230,7 +229,7 @@ Range Range::intersect (const Range& other) const
|
|||
return result;
|
||||
}
|
||||
|
||||
return Range (Datetime (0), Datetime (0));
|
||||
return Range {};
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue