make TDB2.pending/completed non-public

References to methods on these fields are replaced with methods on TDB2,
several of which already existed.
This commit is contained in:
Dustin J. Mitchell
2022-04-01 23:20:57 +00:00
committed by Tomas Babej
parent 4ebd0ffb39
commit 271d06cd9c
11 changed files with 43 additions and 33 deletions

View File

@@ -98,7 +98,7 @@ void Filter::subset (std::vector <Task>& output)
if (precompiled.size ())
{
Timer timer_pending;
auto pending = Context::getContext ().tdb2.pending.get_tasks ();
auto pending = Context::getContext ().tdb2.pending_tasks ();
Context::getContext ().time_filter_us -= timer_pending.total_us ();
_startCount = (int) pending.size ();
@@ -126,7 +126,7 @@ void Filter::subset (std::vector <Task>& output)
if (! shortcut)
{
Timer timer_completed;
auto completed = Context::getContext ().tdb2.completed.get_tasks ();
auto completed = Context::getContext ().tdb2.completed_tasks ();
Context::getContext ().time_filter_us -= timer_completed.total_us ();
_startCount += (int) completed.size ();
@@ -149,11 +149,7 @@ void Filter::subset (std::vector <Task>& output)
safety ();
Timer pending_completed;
for (auto& task : Context::getContext ().tdb2.pending.get_tasks ())
output.push_back (task);
for (auto& task : Context::getContext ().tdb2.completed.get_tasks ())
output.push_back (task);
output = Context::getContext ().tdb2.all_tasks ();
Context::getContext ().time_filter_us -= pending_completed.total_us ();
}