mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibCore+Everywhere: Remove ArgsParser::add*(char const*&)
This is not guaranteed to always work correctly as ArgsParser deals in StringViews and might have a non-properly-null-terminated string as a value. As a bonus, using StringView (and DeprecatedString where necessary) leads to nicer looking code too :^)
This commit is contained in:
parent
60908adcbe
commit
500044906d
Notes:
sideshowbarker
2024-07-17 01:27:18 +09:00
Author: https://github.com/alimpfard
Commit: 500044906d
Pull-request: https://github.com/SerenityOS/serenity/pull/17674
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/kleinesfilmroellchen
43 changed files with 122 additions and 145 deletions
|
@ -24,7 +24,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
|
|||
|
||||
bool case_insensitive = false;
|
||||
bool echo = false;
|
||||
char const* pattern = nullptr;
|
||||
StringView pattern;
|
||||
int signal = SIGTERM;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue