mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:17:35 +00:00
LibCore+Userland: Remove ArgsParser::add*(Vector<char const*>&)
This finally makes ArgsParser's value API free of silly char*'s!
This commit is contained in:
parent
500044906d
commit
23c514cda3
5 changed files with 31 additions and 47 deletions
|
@ -649,22 +649,6 @@ void ArgsParser::add_positional_argument(double& value, char const* help_string,
|
|||
add_positional_argument(move(arg));
|
||||
}
|
||||
|
||||
void ArgsParser::add_positional_argument(Vector<char const*>& values, char const* help_string, char const* name, Required required)
|
||||
{
|
||||
Arg arg {
|
||||
help_string,
|
||||
name,
|
||||
required == Required::Yes ? 1 : 0,
|
||||
INT_MAX,
|
||||
[&values](StringView s) {
|
||||
VERIFY(s.length() == strlen(s.characters_without_null_termination()));
|
||||
values.append(s.characters_without_null_termination());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
add_positional_argument(move(arg));
|
||||
}
|
||||
|
||||
void ArgsParser::add_positional_argument(Vector<DeprecatedString>& values, char const* help_string, char const* name, Required required)
|
||||
{
|
||||
Arg arg {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue