mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI
- Removed unused 'token' arg from ::isUUID.
This commit is contained in:
parent
7f061eef95
commit
0b073bc8d1
2 changed files with 4 additions and 5 deletions
|
@ -476,8 +476,6 @@ const std::string CLI::dump () const
|
||||||
// Either the arg is appended to _original_args intact, or the lexemes are.
|
// Either the arg is appended to _original_args intact, or the lexemes are.
|
||||||
void CLI::addArg (const std::string& arg)
|
void CLI::addArg (const std::string& arg)
|
||||||
{
|
{
|
||||||
std::string token;
|
|
||||||
|
|
||||||
// Do not lex RC overrides.
|
// Do not lex RC overrides.
|
||||||
if (arg.length () > 3 &&
|
if (arg.length () > 3 &&
|
||||||
(arg.substr (0, 3) == "rc." ||
|
(arg.substr (0, 3) == "rc." ||
|
||||||
|
@ -498,7 +496,7 @@ void CLI::addArg (const std::string& arg)
|
||||||
_original_args.push_back (arg);
|
_original_args.push_back (arg);
|
||||||
|
|
||||||
// Do not lex UUIDs.
|
// Do not lex UUIDs.
|
||||||
else if (isUUID (arg, token))
|
else if (isUUID (arg))
|
||||||
_original_args.push_back (arg);
|
_original_args.push_back (arg);
|
||||||
|
|
||||||
// Do not lex, unless lexing reveals OPs.
|
// Do not lex, unless lexing reveals OPs.
|
||||||
|
@ -1694,12 +1692,13 @@ void CLI::decomposeModSubstitutions ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool CLI::isUUID (const std::string& raw, std::string& token) const
|
bool CLI::isUUID (const std::string& raw) const
|
||||||
{
|
{
|
||||||
// UUIDs have a limited character set.
|
// UUIDs have a limited character set.
|
||||||
if (raw.find_first_not_of ("0123456789abcdefABCDEF-,") == std::string::npos)
|
if (raw.find_first_not_of ("0123456789abcdefABCDEF-,") == std::string::npos)
|
||||||
{
|
{
|
||||||
Nibbler n (raw);
|
Nibbler n (raw);
|
||||||
|
std::string token;
|
||||||
if (n.getUUID (token) || n.getPartialUUID (token))
|
if (n.getUUID (token) || n.getPartialUUID (token))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ private:
|
||||||
void decomposeModTags ();
|
void decomposeModTags ();
|
||||||
void decomposeModSubstitutions ();
|
void decomposeModSubstitutions ();
|
||||||
|
|
||||||
bool isUUID (const std::string&, std::string&) const;
|
bool isUUID (const std::string&) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::multimap <std::string, std::string> _entities;
|
std::multimap <std::string, std::string> _entities;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue