mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: Removed unnecessary processing of filter
This commit is contained in:
parent
442ef6a29b
commit
2bdaa37e32
1 changed files with 10 additions and 11 deletions
21
src/CLI2.cpp
21
src/CLI2.cpp
|
@ -555,23 +555,22 @@ void CLI2::analyze ()
|
|||
// Process raw string.
|
||||
void CLI2::addFilter (const std::string& arg)
|
||||
{
|
||||
std::vector <std::string> filter;
|
||||
|
||||
if (arg.length ())
|
||||
{
|
||||
std::vector <std::string> filter;
|
||||
filter.push_back ("(");
|
||||
|
||||
std::string lexeme;
|
||||
Lexer::Type type;
|
||||
Lexer lex (arg);
|
||||
std::string lexeme;
|
||||
Lexer::Type type;
|
||||
Lexer lex (arg);
|
||||
|
||||
while (lex.token (lexeme, type))
|
||||
filter.push_back (lexeme);
|
||||
while (lex.token (lexeme, type))
|
||||
filter.push_back (lexeme);
|
||||
|
||||
if (arg.length ())
|
||||
filter.push_back (")");
|
||||
|
||||
add (filter);
|
||||
analyze ();
|
||||
add (filter);
|
||||
analyze ();
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue