diff options
author | Brad King <brad.king@kitware.com> | 2022-07-20 19:52:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-25 17:51:43 (GMT) |
commit | f95a5832c7ce6e88bd623e818471fa8c23fa77f4 (patch) | |
tree | 59264f579af5b4c07ad21fe07c6101bf03088777 /Source/cmArgumentParser.h | |
parent | 9a7efb681331f77a3873bd9fb5694ad46338c0f7 (diff) | |
download | CMake-f95a5832c7ce6e88bd623e818471fa8c23fa77f4.zip CMake-f95a5832c7ce6e88bd623e818471fa8c23fa77f4.tar.gz CMake-f95a5832c7ce6e88bd623e818471fa8c23fa77f4.tar.bz2 |
cmArgumentParser: Drop unused keywordsMissingValue argument to Parse()
All clients have been converted to encoding this requirement in their
bindings.
Diffstat (limited to 'Source/cmArgumentParser.h')
-rw-r--r-- | Source/cmArgumentParser.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index ae3a000..70deaa6 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -115,13 +115,11 @@ class Instance public: Instance(ActionMap const& bindings, ParseResult* parseResult, std::vector<std::string>* unparsedArguments, - std::vector<cm::string_view>* keywordsMissingValue, std::vector<cm::string_view>* parsedKeywords, void* result = nullptr) : Bindings(bindings) , ParseResults(parseResult) , UnparsedArguments(unparsedArguments) - , KeywordsMissingValue(keywordsMissingValue) , ParsedKeywords(parsedKeywords) , Result(result) { @@ -157,7 +155,6 @@ private: ActionMap const& Bindings; ParseResult* ParseResults = nullptr; std::vector<std::string>* UnparsedArguments = nullptr; - std::vector<cm::string_view>* KeywordsMissingValue = nullptr; std::vector<cm::string_view>* ParsedKeywords = nullptr; void* Result = nullptr; @@ -193,25 +190,22 @@ public: template <typename Range> bool Parse(Result& result, Range const& args, std::vector<std::string>* unparsedArguments, - std::vector<cm::string_view>* keywordsMissingValue = nullptr, std::vector<cm::string_view>* parsedKeywords = nullptr) const { using ArgumentParser::AsParseResultPtr; ParseResult* parseResultPtr = AsParseResultPtr(result); Instance instance(this->Bindings, parseResultPtr, unparsedArguments, - keywordsMissingValue, parsedKeywords, &result); + parsedKeywords, &result); instance.Parse(args); return parseResultPtr ? static_cast<bool>(*parseResultPtr) : true; } template <typename Range> Result Parse(Range const& args, std::vector<std::string>* unparsedArguments, - std::vector<cm::string_view>* keywordsMissingValue = nullptr, std::vector<cm::string_view>* parsedKeywords = nullptr) const { Result result; - this->Parse(result, args, unparsedArguments, keywordsMissingValue, - parsedKeywords); + this->Parse(result, args, unparsedArguments, parsedKeywords); return result; } }; @@ -230,12 +224,11 @@ public: template <typename Range> ParseResult Parse( Range const& args, std::vector<std::string>* unparsedArguments, - std::vector<cm::string_view>* keywordsMissingValue = nullptr, std::vector<cm::string_view>* parsedKeywords = nullptr) const { ParseResult parseResult; Instance instance(this->Bindings, &parseResult, unparsedArguments, - keywordsMissingValue, parsedKeywords); + parsedKeywords); instance.Parse(args); return parseResult; } |