mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +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
43 changed files with 122 additions and 145 deletions
|
@ -315,7 +315,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
bool print_all_output = false;
|
||||
bool run_benchmarks = false;
|
||||
bool run_skipped_tests = false;
|
||||
char const* specified_test_root = nullptr;
|
||||
StringView specified_test_root;
|
||||
DeprecatedString test_glob;
|
||||
DeprecatedString exclude_pattern;
|
||||
DeprecatedString config_file;
|
||||
|
@ -360,7 +360,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
DeprecatedString test_root;
|
||||
|
||||
if (specified_test_root) {
|
||||
if (!specified_test_root.is_empty()) {
|
||||
test_root = DeprecatedString { specified_test_root };
|
||||
} else {
|
||||
test_root = "/usr/Tests";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue