diff --git a/src/Filter.cpp b/src/Filter.cpp index ba950f704..6e430c499 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -198,6 +198,16 @@ void Filter::subset (std::vector & 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 diff --git a/src/Filter.h b/src/Filter.h index 80c84487a..21f76fd44 100644 --- a/src/Filter.h +++ b/src/Filter.h @@ -42,6 +42,7 @@ public: void subset (const std::vector &, std::vector &, bool applyContext = true); void subset (std::vector &, bool applyContext = true); + bool hasModifications (); bool pendingOnly (); void safety (); void disableSafety ();