CmdBurndown: Removed unreachable code (completed/deleted tasks have no 'start' date)
This commit is contained in:
@@ -293,36 +293,6 @@ void Chart::scan (std::vector <Task>& tasks)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (task.has ("start"))
|
|
||||||
{
|
|
||||||
ISO8601d start = quantize (ISO8601d (task.get_date ("start")));
|
|
||||||
while (from < start)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._started;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < now)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._done;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ISO8601d end = quantize (ISO8601d (task.get_date ("end")));
|
|
||||||
while (from < end)
|
while (from < end)
|
||||||
{
|
{
|
||||||
epoch = from.toEpoch ();
|
epoch = from.toEpoch ();
|
||||||
@@ -339,7 +309,6 @@ void Chart::scan (std::vector <Task>& tasks)
|
|||||||
from = increment (from);
|
from = increment (from);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// e--D e--s--D
|
// e--D e--s--D
|
||||||
// ppp pppsss
|
// ppp pppsss
|
||||||
@@ -354,28 +323,6 @@ void Chart::scan (std::vector <Task>& tasks)
|
|||||||
if (end < _earliest)
|
if (end < _earliest)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (task.has ("start"))
|
|
||||||
{
|
|
||||||
ISO8601d start = quantize (ISO8601d (task.get_date ("start")));
|
|
||||||
while (from < start)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._pending;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (from < end)
|
|
||||||
{
|
|
||||||
epoch = from.toEpoch ();
|
|
||||||
if (_bars.find (epoch) != _bars.end ())
|
|
||||||
++_bars[epoch]._started;
|
|
||||||
from = increment (from);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ISO8601d end = quantize (ISO8601d (task.get_date ("end")));
|
|
||||||
while (from < end)
|
while (from < end)
|
||||||
{
|
{
|
||||||
epoch = from.toEpoch ();
|
epoch = from.toEpoch ();
|
||||||
@@ -385,7 +332,6 @@ void Chart::scan (std::vector <Task>& tasks)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Size the data.
|
// Size the data.
|
||||||
maxima ();
|
maxima ();
|
||||||
|
|||||||
Reference in New Issue
Block a user