mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Datafile: Added assert to ::deleteInterval to confirm redundancy
This commit is contained in:
parent
32e066a388
commit
d601a77c42
1 changed files with 10 additions and 12 deletions
|
@ -105,10 +105,9 @@ void Datafile::addInterval (const Interval& interval)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Datafile::deleteInterval (const Interval& interval)
|
||||
{
|
||||
// Return false if the interval does not belong in this file.
|
||||
// Note: end date might be zero.
|
||||
if (_range.overlap (interval.range))
|
||||
{
|
||||
assert (_range.overlap (interval.range));
|
||||
|
||||
if (! _lines_loaded)
|
||||
load_lines ();
|
||||
|
||||
|
@ -120,7 +119,6 @@ void Datafile::deleteInterval (const Interval& interval)
|
|||
_dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void Datafile::commit ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue