CLI2: Generalize _context_filter_added latch name

This commit is contained in:
Tomas Babej 2021-01-27 22:54:31 -05:00
parent 510786ff91
commit a2c3d224d3
2 changed files with 4 additions and 4 deletions

View file

@ -564,7 +564,7 @@ void CLI2::addFilter (const std::string& arg)
void CLI2::addContextFilter ()
{
// Recursion block.
if (_context_filter_added)
if (_context_added)
return;
// Detect if any context is set, and bail out if not
@ -595,7 +595,7 @@ void CLI2::addContextFilter ()
Context::getContext ().debug ("Context '" + contextName + "' not defined.");
else
{
_context_filter_added = true;
_context_added = true;
addFilter (contextFilter);
if (Context::getContext ().verbose ("context"))
Context::getContext ().footnote (format ("Context '{1}' set. Use 'task context none' to remove.", contextName));
@ -610,7 +610,7 @@ void CLI2::prepareFilter ()
// Clear and re-populate.
_id_ranges.clear ();
_uuid_list.clear ();
_context_filter_added = false;
_context_added = false;
// Remove all the syntactic sugar for FILTERs.
lexFilterArgs ();

View file

@ -113,7 +113,7 @@ public:
std::vector <std::pair <std::string, std::string>> _id_ranges {};
std::vector <std::string> _uuid_list {};
bool _context_filter_added {false};
bool _context_added {false};
};
#endif