mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Remove unused outerRange
outerRange is no longer used, since the filter was simply started based on the first line in the database now.
This commit is contained in:
parent
3ec09f9be1
commit
bd1f7aef99
1 changed files with 0 additions and 25 deletions
25
src/data.cpp
25
src/data.cpp
|
@ -485,31 +485,6 @@ std::vector <Range> subtractRanges (
|
|||
return results;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// From a set of intervals, find the earliest start and the latest end, and
|
||||
// return these in a Range.
|
||||
Range outerRange (const std::vector <Interval>& intervals)
|
||||
{
|
||||
Range outer;
|
||||
for (auto& interval : intervals)
|
||||
{
|
||||
if (interval.start < outer.start || outer.start.toEpoch () == 0)
|
||||
outer.start = interval.start;
|
||||
|
||||
// Deliberately mixed start/end.
|
||||
if (interval.start > outer.end)
|
||||
outer.end = interval.start;
|
||||
|
||||
if (interval.end > outer.end)
|
||||
outer.end = interval.end;
|
||||
|
||||
if (! interval.is_ended ())
|
||||
outer.end = Datetime ();
|
||||
}
|
||||
|
||||
return outer;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// An interval matches a filter interval if the start/end overlaps, and all
|
||||
// filter interval tags are found in the interval.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue