Small refactoring on class Range

This commit is contained in:
Thomas Lauf 2018-01-05 10:51:03 +01:00
parent 3aa932eafe
commit 3100ed4b6f

View file

@ -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 {};
}
////////////////////////////////////////////////////////////////////////////////