Add Task.is_empty, needed to identify "dummy" tasks (simple refactor)
getDOM takes an &Task that may be a reference to a dummy, or may be a real task. The is_empty method replaces `task.data.size() == 0` as a way to distinguish the two.
This commit is contained in:
committed by
Tomas Babej
parent
dede40bc4e
commit
0d9e402d3e
@@ -363,6 +363,14 @@ Task::dateState Task::getDateState (const std::string& name) const
|
||||
return dateNotDue;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// An empty task is typically a "dummy", such as in DOM evaluation, which may or
|
||||
// may not occur in the context of a task.
|
||||
bool Task::is_empty () const
|
||||
{
|
||||
return data.size () == 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Ready means pending, not blocked and either not scheduled or scheduled before
|
||||
// now.
|
||||
|
||||
Reference in New Issue
Block a user