mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/alimpfard
Commit: 23c514cda3
Pull-request: https://github.com/SerenityOS/serenity/pull/17674
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
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