Filter: Implemented ::hasModifications to detect command line modifications

This commit is contained in:
Paul Beckingham
2015-07-25 09:28:55 -04:00
parent 6510026189
commit 7aa101de58
2 changed files with 11 additions and 0 deletions

View File

@@ -198,6 +198,16 @@ void Filter::subset (std::vector <Task>& output, bool applyContext /* = true */)
context.timer_filter.stop ();
}
////////////////////////////////////////////////////////////////////////////////
bool Filter::hasModifications ()
{
for (auto& a : context.cli2._args)
if (a.hasTag ("MODIFICATION"))
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