Use functions is_started() and is_ended() instead of querying start/end directly

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2020-06-29 22:09:00 +02:00
parent 4637cd3d4e
commit 07a6dfe313

View file

@ -403,9 +403,7 @@ std::vector <Range> subtractRanges (
// An interval matches a filter range if the start/end overlaps // An interval matches a filter range if the start/end overlaps
bool matchesRange (const Interval& interval, const Range& filter) bool matchesRange (const Interval& interval, const Range& filter)
{ {
return ((filter.start.toEpoch () == 0 && return ((!filter.is_started() && !filter.is_ended()) || interval.intersects (filter));
filter.end.toEpoch () == 0
) || interval.intersects (filter));
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////