From d5a4f239372462a328d5d713d4a94b8e41eefd47 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 29 Oct 2014 23:49:23 -0400 Subject: [PATCH] CLI - Implemented ::isTerminator. --- src/CLI.cpp | 11 +++++++++-- src/CLI.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/CLI.cpp b/src/CLI.cpp index 56e18946a..ce1e66bfe 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -480,8 +480,9 @@ const std::string CLI::dump () const // Either the arg is appended to _original_args intact, or the lexemes are. void CLI::addArg (const std::string& arg) { - // Do not lex RC overrides, UUIDs, patterns, substitutions. - if (isRCOverride (arg) || + // Do not lex RC overrides, IDs, UUIDs, patterns, substitutions. + if (isTerminator (arg) || + isRCOverride (arg) || isConfigOverride (arg) || isUUIDList (arg) || isUUID (arg) || @@ -1685,6 +1686,12 @@ void CLI::decomposeModSubstitutions () } } +//////////////////////////////////////////////////////////////////////////////// +bool CLI::isTerminator (const std::string& raw) const +{ + return (raw == "--"); +} + //////////////////////////////////////////////////////////////////////////////// bool CLI::isRCOverride (const std::string& raw) const { diff --git a/src/CLI.h b/src/CLI.h index 9ac5d777a..016a854fa 100644 --- a/src/CLI.h +++ b/src/CLI.h @@ -98,6 +98,7 @@ private: void decomposeModTags (); void decomposeModSubstitutions (); + bool isTerminator (const std::string&) const; bool isRCOverride (const std::string&) const; bool isConfigOverride (const std::string&) const; bool isUUIDList (const std::string&) const;