summaryrefslogtreecommitdiff
path: root/Userland/DevTools/HackStudio/main.cpp
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2023-03-01 00:11:43 +0330
committerAndreas Kling <kling@serenityos.org>2023-03-01 10:47:19 +0100
commit500044906d1b90f1c8b1a2f5675a2f82ab92b758 (patch)
tree7d6aae259b188c1b6879c591eebdfd7f55d9b71c /Userland/DevTools/HackStudio/main.cpp
parent60908adcbe2afd611233957bb3126f736eb18e25 (diff)
downloadserenity-500044906d1b90f1c8b1a2f5675a2f82ab92b758.zip
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 :^)
Diffstat (limited to 'Userland/DevTools/HackStudio/main.cpp')
-rw-r--r--Userland/DevTools/HackStudio/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/main.cpp b/Userland/DevTools/HackStudio/main.cpp
index bf8136b868..aaed97dade 100644
--- a/Userland/DevTools/HackStudio/main.cpp
+++ b/Userland/DevTools/HackStudio/main.cpp
@@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(notify_make_not_available());
}
- char const* path_argument = nullptr;
+ StringView path_argument;
bool mode_coredump = false;
pid_t pid_to_debug = -1;
Core::ArgsParser args_parser;