mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Do not manipulate filter in getTracked
- Filter shall be taken as is, not changed - If there is a problem, the functions consuming the filter have to be adapted, not the filter Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
63f230013a
commit
4637cd3d4e
1 changed files with 0 additions and 21 deletions
21
src/data.cpp
21
src/data.cpp
|
@ -488,27 +488,6 @@ std::vector <Interval> getTracked (
|
|||
const Rules& rules,
|
||||
Interval& filter)
|
||||
{
|
||||
// Exclusions are only usable within a range, so if no filter range exists,
|
||||
// determine the infinite range starting at the first inclusion, i.e.:
|
||||
//
|
||||
// [earliest start, infinity)
|
||||
//
|
||||
// Avoid assigning a zero-width range - leave it unstarted instead.
|
||||
if (! filter.is_started ())
|
||||
{
|
||||
auto begin = database.rbegin ();
|
||||
auto end = database.rend ();
|
||||
if (begin != end)
|
||||
{
|
||||
filter.start = IntervalFactory::fromSerialization (*begin).start;
|
||||
}
|
||||
|
||||
// Use an infinite range instead of the last end date; this prevents
|
||||
// issues when there is an empty range [q, q) at the end of a filter
|
||||
// [p, q), in which case there is no overlap or intersection.
|
||||
filter.end = 0;
|
||||
}
|
||||
|
||||
int id_skip = 0;
|
||||
std::deque <Interval> intervals;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue