mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug 899
- Fixed bug #899, which displayed incorrect project completion numbers (thanks to Paul-Gheorghe Barbu). - Added unit tests.
This commit is contained in:
parent
c092b027a6
commit
bf9e14f581
5 changed files with 68 additions and 15 deletions
14
src/TDB2.cpp
14
src/TDB2.cpp
|
@ -92,15 +92,8 @@ void TF2::target (const std::string& f)
|
|||
const std::vector <Task>& TF2::get_tasks ()
|
||||
{
|
||||
if (! _loaded_tasks)
|
||||
{
|
||||
load_tasks ();
|
||||
|
||||
// Apply previously added tasks.
|
||||
std::vector <Task>::iterator i;
|
||||
for (i = _added_tasks.begin (); i != _added_tasks.end (); ++i)
|
||||
_tasks.push_back (*i);
|
||||
}
|
||||
|
||||
return _tasks;
|
||||
}
|
||||
|
||||
|
@ -108,15 +101,8 @@ const std::vector <Task>& TF2::get_tasks ()
|
|||
const std::vector <std::string>& TF2::get_lines ()
|
||||
{
|
||||
if (! _loaded_lines)
|
||||
{
|
||||
load_lines ();
|
||||
|
||||
// Apply previously added lines.
|
||||
std::vector <std::string>::iterator i;
|
||||
for (i = _added_lines.begin (); i != _added_lines.end (); ++i)
|
||||
_lines.push_back (*i);
|
||||
}
|
||||
|
||||
return _lines;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue