mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Let Interval inherit from Range
- Remove 1 level of indirection - Remove public field Interval::range (instead use interval directly)
This commit is contained in:
parent
0d33700336
commit
9dd106116c
30 changed files with 289 additions and 280 deletions
|
@ -70,7 +70,7 @@ int CmdLengthen (
|
|||
if (tracked[tracked.size () - id].synthetic && dirty)
|
||||
{
|
||||
auto latest = getLatestInterval (database);
|
||||
auto exclusions = getAllExclusions (rules, filter.range);
|
||||
auto exclusions = getAllExclusions (rules, filter);
|
||||
|
||||
Interval modified {latest};
|
||||
|
||||
|
@ -90,13 +90,13 @@ int CmdLengthen (
|
|||
throw format ("ID '@{1}' does not correspond to any tracking.", id);
|
||||
|
||||
Interval i = tracked[tracked.size () - id];
|
||||
if (i.range.is_open ())
|
||||
if (i.is_open ())
|
||||
throw format ("Cannot lengthen open interval @{1}", id);
|
||||
|
||||
database.deleteInterval (tracked[tracked.size () - id]);
|
||||
|
||||
Duration dur (delta);
|
||||
i.range.end += dur.toTime_t ();
|
||||
i.end += dur.toTime_t ();
|
||||
validate (cli, rules, database, i);
|
||||
database.addInterval (i, rules.getBoolean ("verbose"));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue