mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
helper: Fixed bug that lost results when no ranges were subtracted from another range
This commit is contained in:
parent
e626d93044
commit
5313dbc6bf
1 changed files with 3 additions and 1 deletions
|
@ -447,8 +447,10 @@ std::vector <Daterange> subtractRanges (
|
|||
const std::vector <Daterange>& ranges,
|
||||
const std::vector <Daterange>& subtractions)
|
||||
{
|
||||
std::vector <Daterange> results;
|
||||
if (! subtractions.size ())
|
||||
return ranges;
|
||||
|
||||
std::vector <Daterange> results;
|
||||
for (auto& r1 : ranges)
|
||||
for (auto& r2 : subtractions)
|
||||
for (auto& r3 : r1.subtract (r2))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue