summaryrefslogtreecommitdiffstats
path: root/Source/cmArgumentParser.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-07-20 19:20:10 (GMT)
committerBrad King <brad.king@kitware.com>2022-07-25 17:52:11 (GMT)
commit2eba10c5ee0e20cee5bbcc43fbb29eee0529e8e9 (patch)
tree6c5e4ada38a0ae171b1f6f10d5b110c84e1b0b07 /Source/cmArgumentParser.h
parent98cf623821cd5bf31e0afc47e7c6362c10bfeee2 (diff)
downloadCMake-2eba10c5ee0e20cee5bbcc43fbb29eee0529e8e9.zip
CMake-2eba10c5ee0e20cee5bbcc43fbb29eee0529e8e9.tar.gz
CMake-2eba10c5ee0e20cee5bbcc43fbb29eee0529e8e9.tar.bz2
cmArgumentParser: Drop unused parsedKeywords argument to Parse()
All clients have been ported to use a binding instead.
Diffstat (limited to 'Source/cmArgumentParser.h')
-rw-r--r--Source/cmArgumentParser.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h
index 7e219ae..33b8fff 100644
--- a/Source/cmArgumentParser.h
+++ b/Source/cmArgumentParser.h
@@ -121,13 +121,10 @@ class Instance
{
public:
Instance(ActionMap const& bindings, ParseResult* parseResult,
- std::vector<std::string>* unparsedArguments,
- std::vector<cm::string_view>* parsedKeywords,
- void* result = nullptr)
+ std::vector<std::string>* unparsedArguments, void* result = nullptr)
: Bindings(bindings)
, ParseResults(parseResult)
, UnparsedArguments(unparsedArguments)
- , ParsedKeywords(parsedKeywords)
, Result(result)
{
}
@@ -162,7 +159,6 @@ private:
ActionMap const& Bindings;
ParseResult* ParseResults = nullptr;
std::vector<std::string>* UnparsedArguments = nullptr;
- std::vector<cm::string_view>* ParsedKeywords = nullptr;
void* Result = nullptr;
cm::string_view Keyword;
@@ -206,23 +202,22 @@ public:
template <typename Range>
bool Parse(Result& result, Range const& args,
- std::vector<std::string>* unparsedArguments,
- std::vector<cm::string_view>* parsedKeywords = nullptr) const
+ std::vector<std::string>* unparsedArguments) const
{
using ArgumentParser::AsParseResultPtr;
ParseResult* parseResultPtr = AsParseResultPtr(result);
Instance instance(this->Bindings, parseResultPtr, unparsedArguments,
- parsedKeywords, &result);
+ &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>* parsedKeywords = nullptr) const
+ Result Parse(Range const& args,
+ std::vector<std::string>* unparsedArguments) const
{
Result result;
- this->Parse(result, args, unparsedArguments, parsedKeywords);
+ this->Parse(result, args, unparsedArguments);
return result;
}
};
@@ -246,13 +241,11 @@ public:
}
template <typename Range>
- ParseResult Parse(
- Range const& args, std::vector<std::string>* unparsedArguments,
- std::vector<cm::string_view>* parsedKeywords = nullptr) const
+ ParseResult Parse(Range const& args,
+ std::vector<std::string>* unparsedArguments) const
{
ParseResult parseResult;
- Instance instance(this->Bindings, &parseResult, unparsedArguments,
- parsedKeywords);
+ Instance instance(this->Bindings, &parseResult, unparsedArguments);
instance.Parse(args);
return parseResult;
}