Filter: Implemented ::hasMiscellaneous

This commit is contained in:
Paul Beckingham 2015-08-28 07:24:50 -04:00
parent 3f4daeacf0
commit ec0728ff8e
2 changed files with 11 additions and 0 deletions

View file

@ -218,6 +218,16 @@ bool Filter::hasModifications ()
return false;
}
////////////////////////////////////////////////////////////////////////////////
bool Filter::hasMiscellaneous ()
{
for (auto& a : context.cli2._args)
if (a.hasTag ("MISCELLANEOUS"))
return true;
return false;
}
////////////////////////////////////////////////////////////////////////////////
// If the filter contains no 'or', 'xor' or 'not' operators, and only includes
// status values 'pending', 'waiting' or 'recurring', then the filter is

View file

@ -44,6 +44,7 @@ public:
void subset (std::vector <Task>&);
bool hasFilter ();
bool hasModifications ();
bool hasMiscellaneous ();
bool pendingOnly ();
void safety ();
void disableSafety ();