From f2b5fb6d93ccc39ab2649f4f977fa4b089487c10 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 20 Jun 2015 09:39:07 -0700 Subject: [PATCH] CLI2: Removed unused ::isIDSequence method --- src/CLI2.cpp | 38 ++------------------------------------ src/CLI2.h | 1 - 2 files changed, 2 insertions(+), 37 deletions(-) diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 08cd0c84d..dc6b2e9cf 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -2058,40 +2058,6 @@ bool CLI2::isUUIDList (const std::string& raw) const 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 elements; - split (elements, raw, ','); - - for (auto& e : elements) - { - // Split the ID range into min/max. - std::vector 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 { @@ -2236,8 +2202,8 @@ bool CLI2::disqualifyOnlyParenOps ( else if (isTag (lexeme.first) || isUUIDList (lexeme.first) || - isUUID (lexeme.first) || - isIDSequence (lexeme.first) || + isUUID (lexeme.first) || // obsolete + isIDSequence (lexeme.first) || // obsolete isID (lexeme.first) || isPattern (lexeme.first) || isAttribute (lexeme.first)) diff --git a/src/CLI2.h b/src/CLI2.h index 3e24a889a..4d43dc0b4 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -133,7 +133,6 @@ private: bool isCommand (const std::string&) const; bool isTag (const std::string&) const; bool isUUIDList (const std::string&) const; - bool isIDSequence (const std::string&) const; bool isID (const std::string&) const; bool isPattern (const std::string&) const; bool isSubstitution (const std::string&) const;