mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 07:57:20 +02:00
CLI2: Removed unused ::isIDSequence method
This commit is contained in:
parent
3782f37d9d
commit
f2b5fb6d93
2 changed files with 2 additions and 37 deletions
38
src/CLI2.cpp
38
src/CLI2.cpp
|
@ -2058,40 +2058,6 @@ bool CLI2::isUUIDList (const std::string& raw) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
bool CLI2::isIDSequence (const std::string& raw) const
|
|
||||||
{
|
|
||||||
if (raw.find_first_not_of ("0123456789,-") == std::string::npos)
|
|
||||||
{
|
|
||||||
// Split the ID list into elements.
|
|
||||||
std::vector <std::string> elements;
|
|
||||||
split (elements, raw, ',');
|
|
||||||
|
|
||||||
for (auto& e : elements)
|
|
||||||
{
|
|
||||||
// Split the ID range into min/max.
|
|
||||||
std::vector <std::string> terms;
|
|
||||||
split (terms, e, '-');
|
|
||||||
|
|
||||||
if (terms.size () == 1 &&
|
|
||||||
! isID (terms[0]))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
else if (terms.size () == 2 &&
|
|
||||||
(! isID (terms[0]) ||
|
|
||||||
! isID (terms[1])))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
else if (terms.size () > 2)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool CLI2::isID (const std::string& raw) const
|
bool CLI2::isID (const std::string& raw) const
|
||||||
{
|
{
|
||||||
|
@ -2236,8 +2202,8 @@ bool CLI2::disqualifyOnlyParenOps (
|
||||||
|
|
||||||
else if (isTag (lexeme.first) ||
|
else if (isTag (lexeme.first) ||
|
||||||
isUUIDList (lexeme.first) ||
|
isUUIDList (lexeme.first) ||
|
||||||
isUUID (lexeme.first) ||
|
isUUID (lexeme.first) || // obsolete
|
||||||
isIDSequence (lexeme.first) ||
|
isIDSequence (lexeme.first) || // obsolete
|
||||||
isID (lexeme.first) ||
|
isID (lexeme.first) ||
|
||||||
isPattern (lexeme.first) ||
|
isPattern (lexeme.first) ||
|
||||||
isAttribute (lexeme.first))
|
isAttribute (lexeme.first))
|
||||||
|
|
|
@ -133,7 +133,6 @@ private:
|
||||||
bool isCommand (const std::string&) const;
|
bool isCommand (const std::string&) const;
|
||||||
bool isTag (const std::string&) const;
|
bool isTag (const std::string&) const;
|
||||||
bool isUUIDList (const std::string&) const;
|
bool isUUIDList (const std::string&) const;
|
||||||
bool isIDSequence (const std::string&) const;
|
|
||||||
bool isID (const std::string&) const;
|
bool isID (const std::string&) const;
|
||||||
bool isPattern (const std::string&) const;
|
bool isPattern (const std::string&) const;
|
||||||
bool isSubstitution (const std::string&) const;
|
bool isSubstitution (const std::string&) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue